文档菜单
文档首页
/ /
MongoDB CLI
/ / / /

mongocli ops-manager performanceAdvisor namespaces list

本页内容

  • 语法
  • 选项
  • 继承选项
  • 示例

返回指定主机上查询缓慢的集合的前20个命名空间。

命名空间以以下格式显示:{数据库}.{集合}。

如果您未设置持续时间选项或since选项,此命令将返回最后24小时的数据。

使用此命令,您必须使用具有项目只读角色的用户帐户或API密钥进行身份验证。

命令语法
mongocli ops-manager performanceAdvisor namespaces list [options]
名称
类型
必需
描述
--duration
int
false
返回结果的时间长度(毫秒)。如果指定了since选项,则持续时间从指定的日期和时间开始。如果没有设置since选项,则此命令从当前时间之前的时间返回数据。
-h, --help
false
list的帮助信息
--hostId
string
true
MongoDB进程的主机的唯一标识符。
-o, --output
string
false
输出格式。有效值为json、json-path、go-template或go-template-file。要查看完整的输出,请使用-o json选项。
--projectId
string
false
十六进制字符串,用于标识要使用的项目。此选项覆盖配置文件或环境变量中的设置。
--since
int
false
查询建议索引的起始日期和时间。请以自UNIX纪元以来的秒数指定此值。如果您未设置持续时间选项,则此命令返回自since值到当前时间的所有数据。
名称
类型
必需
描述
-P, --profile
string
false
从配置文件中使用的配置文件名。有关MongoCLI配置文件中的配置文件信息,请参阅https://dochub.mongodb.org/core/atlas-cli-configuration-file.
# Return a JSON-formatted list of namespaces for collections with slow queries for the atlas-111ggi-shard-00-00.111xx.mongodb.net:27017 host in the project with the ID 5e2211c17a3e5a48f5497de3:
mongocli [ops-manager|cloud-manager] performanceAdvisor namespaces list --processName atlas-111ggi-shard-00-00.111xx.mongodb.net:27017 --projectId 5e2211c17a3e5a48f5497de3 --output json

返回

命名空间

© . All rights reserved.