开发者

Getting mongoStat through mongoDB Java driver

Is there a way to get the results of the mongostat utility such as no. of qu开发者_运维知识库eries/sec, inserts/sec, etc. through java driver. One way I find out was to get the serverstatus through the Mongo object as:

db.command("serverStatus")

and then get the total queries performed till now and then manipulate it to get queries per second.

Is there any other better way to get this information?


You can use the Db.command("ServerStatus") function to get the Server Status and you can keep polling

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜