📜  python 检查 mognodb 大小 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:14.928000             🧑  作者: Mango

代码示例1
from pymongo 
import MongoClient  
client = MongoClient() 
db = client.test  
# print collection statistics 
# events is the collection name here 
print(db.command("collstats", "events"))
# print database statistics 
print(db.command("dbstats"))