Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MongoDB practice (8) performance Monitoring

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Mongosniff

From the bottom, this tool can monitor which commands are sent to MongoDB for execution, from which you can analyze:

Execute as root:

. / mongosniff-- source NET lo

It then monitors all packet requests locally and listens to MongoDB on the default port 27017 with localhost, such as

Line "show dbs" action:

[root@localhost bin] #. / mongoMongoDB shell version: 1.8.1connecting to: test > show dbsadmin 0.0625GBfoo0.0625GBlocal (empty) test0.0625GB

Then you can see the following output

[root@localhost bin] #. / mongosniff-source NET losniffing... 27017127.0.0.1 admin.$cmd 38500-- > 127.0.0.1 admin.$cmd 27017 60 bytes id:537ebe0f 1400815119query: {replSetGetStatus: 1} ntoreturn: 1 ntoskip: 0127.0.1 ntoskip 27017 127.0.1 admin.$cmd 80 bytes id:537ebe10 1400815120query: {replSetGetStatus: 1 ForShell: 1} ntoreturn: 1 ntoskip: 0127.0.0.1 admin.$cmd 27017 admin.$cmd 67 bytes id:537ebe11 1400815121query: {listDatabases: 1.0} ntoreturn:-1 ntoskip: 0127.0.0.1 forShell 27017 admin.$cmd 80 bytes id:537ebe12 1400815122query: {replSetGetStatus: 1, forShell: 1} ntoreturn: 1 ntoskip: 0127.0.1

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report