In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1)。 Use serverStatus to monitor in Shell
Use the command after entering the Shell client using the mongo command:
> db.serverStatus ()
Hostnam
> db.serverStatus () .host
Lock information
> db.serverStatus () .locks
Global lock information
> db.serverStatus () .globalLock
Memory information
> db.serverStatus () .mem
Number of connections information
> db.serverStatus () .connections
Additional information
> db.serverStatus () .extra_info
Index statistics
> db.serverStatus () .indexCounters
Background refresh information
> db.serverStatus () .backgroundFlushing
Vernier information
> db.serverStatus () .cursors
Network information
> db.serverStatus () .network
Replica set information
> db.serverStatus () .repl
Operation counter of copy set
> db.serverStatus () .opcountersRepl
Operation counter
> db.serverStatus () .opcounters
Assertion information Asserts
> db.serverStatus () .asserts
WriteBacksQueued
> db.serverStatus () .writeBacksQueued
Persistence (dur)
> db.serverStatus () .dur
Record status information
> db.serverStatus () .recordStats
Working set configuration
> db.serverStatus ({workingSet: 1}) .workingSet
Indicator information metrics
> db.serverStatus () .metrics
To monitor a specific parameter, put the parameter name in db.serverStatus (). And then you can.
2)。 Use mongostat to monitor in Shell
The serverStatus command is static monitoring, and MongoDB provides a dynamic monitoring execution tool, mongostat. Mongostat dynamically outputs some important information provided by serverStatus, once per second. Mongostat is used in the same way as the mongo client, using commands under the mongostat executable:
. / mongostat
If the MongoDB executable Bin directory has been added to the environment variable, use:
Mongostat
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Welcome to step on my official account.
© 2024 shulou.com SLNews company. All rights reserved.