Docs 菜单
Docs 主页
/
MongoDB Atlas
/ /

仅在 M 0 、M 2和 M 5集群和无服务器实例中可用的命令

在此页面上

  • atlasSize

以下命令特定于Atlas免费套餐和共享套餐集群以及无服务器实例:

返回以下数据库统计信息的免费层级和共享层级集群以及无服务器实例中所有数据库的累积大小:

{
"totals": {
"collections": [number-total-collections],
"views": [number-total-views],
"objects": [number-total-objects],
"avgObjSize": [number-average-across-all],
"dataSize": [number-total-dataSize],
"storageSize": [number-total-storageSize],
"numExtents": [number-total-numExtents],
"indexes": [number-total-indexes],
"indexSize": [number-total-indexSize],
"fileSize": [number-total-fileSize],
"numDatabases": [number-total-databases],
"indexSize": [number-total-indexSize]
},
"atlasSize": [number-total-data-plus-total-index-size],
"ok": 1
}

atlasSize字段表示集群中数据和索引的总大小的组合。

db.runCommand({atlasSize:1})
{
"totals" : {
"collections" : 11,
"views" : 0,
"objects" : NumberLong(530025),
"avgObjSize" : 277.0923742138365,
"dataSize" : NumberLong(532890980),
"storageSize" : NumberLong(555319296),
"numExtents" : NumberLong(0),
"indexes" : 11,
"indexSize" : NumberLong(4792320),
"fileSize" : NumberLong(0),
"numDatabases" : 4
},
"atlasSize" : NumberLong(537683300),
"ok" : 1
}

后退

不支持的命令

在此页面上