'''
获取mysql的qps
show global status like "Questions";
获取mysql的Binlog文件大小
show master logs;
'''

from __puture__ import print_function
import pymongo
client=pymongo.MongClient(host="127.0.0.1:27017")
client.admin.authenticate("lmx","lmx")
rs=client.admin.command("replSetGetStatus")

print("set:",rs["set"])
print("myState",rs["myState"])
print("num of members:",len(rs["members"]))

 

发表评论

邮箱地址不会被公开。 必填项已用*标注