MongoDB workingSet by pymongo

后端 未结 1 605
醉话见心
醉话见心 2021-01-14 11:03

I try to get \"workingSet\" metrics with pymongo. In MongoDB is just db.runCommand( { serverStatus: 1, workingSet: 1 } ). I\'ve tried in python



        
相关标签:
1条回答
  • 2021-01-14 11:59
    >>> import pymongo
    >>> c = pymongo.MongoClient()
    >>> c['admin'].command('serverStatus', workingSet=True)['workingSet']
    {u'note': u'thisIsAnEstimate', u'computationTimeMicros': 4555, u'pagesInMemory': 7, u'overSeconds': 388}
    
    0 讨论(0)
提交回复
热议问题