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

mongocli cloud-manager performanceAdvisor namespaces list

本页内容

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

返回指定主机上经历慢查询的集合的最高达20个命名空间。

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

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

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

命令语法
mongocli cloud-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

返回

命名空间