执行mongotop 报cannot run mongotop against a mongos
mongotop是一个基于mongod进程的工具,不能对mongos进程执行。如果你想查看mongos的活动情况,可以使用mongostat。命令如下:
mongostat --host <mongos-hostname>:<port> --discover
其中<mongos-hostname>和<port>需要替换成你的mongos的主机名和端口号。--discover选项可以自动发现mongos的所有节点。
原文地址: https://www.cveoy.top/t/topic/bofh 著作权归作者所有。请勿转载和采集!