Home > Database > Mysql Tutorial > mongotop详解

mongotop详解

WBOY
Release: 2016-06-07 16:34:54
Original
1433 people have browsed it

MongoDB自带了mongostat 和 mongotop 这两个命令来监控MongoDB的运行情况。这两个命令对于我们处理MongoDB数据库变慢等等问题非常有用,能详细的统计MongoDB当前的状态信息。mongotop用来跟踪MongoDB的实例, 提供每个集合的统计数据。默认情况下,mongotop

MongoDB自带了mongostat 和 mongotop 这两个命令来监控MongoDB的运行情况。这两个命令对于我们处理MongoDB数据库变慢等等问题非常有用,能详细的统计MongoDB当前的状态信息。 mongotop用来跟踪MongoDB的实例, 提供每个集合的统计数据。默认情况下,mongotop每一秒刷新一次。 mongotop用法:
# /usr/local/mongodb/bin/mongotop --help
View live MongoDB collection statistics.
options:
  --help                                produce help message
  -v [ --verbose ]                      be more verbose (include multiple times
                                        for more verbosity e.g. -vvvvv)
  --version                             print the program's version and exit
  -h [ --host ] arg                     mongo host to connect to ( /s1,s2 for sets)
  --port arg                            server port. Can also use --host 
                                        hostname:port
  --ipv6                                enable IPv6 support (disabled by 
                                        default)
  -u [ --username ] arg                 username
  -p [ --password ] arg                 password
  --authenticationDatabase arg          user source (defaults to dbname)
  --authenticationMechanism arg (=MONGODB-CR)
                                        authentication mechanism
  --locks                               查看数据库锁的情况
Copy after login
# /usr/local/mongodb/bin/mongotop -h 10.0.0.166 -vvvvv
Copy after login
mongotop-1
# /usr/local/mongodb/bin/mongotop -h 10.0.0.166 -vvvvv  --locks
Copy after login
mongotop-2 输出字段说明: ns:数据库命名空间,后者结合了数据库名称和集合。 db:数据库的名称。名为 . 的数据库针对全局锁定,而非特定数据库。 total:mongod在这个命令空间上花费的总时间。 read:在这个命令空间上mongod执行读操作花费的时间。 write:在这个命名空间上mongod进行写操作花费的时间。
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template