MongoDB workingSet by pymongo

后端 未结 1 606
醉话见心
醉话见心 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)
提交回复
热议问题