ยง 2024-05-18
- yushei-dtk-server is 192.168.2.235
ysadmin@yushei-dtk-server:~$ mongostat --host ys20220318/redisMongo03.yushei.com.tw:27017 --username siteRootAdmin --password b23258585 --authenticationDatabase admin --discover
redisMongo03.yushei.com.tw:27017 *0 1 *0 *0 3 4|0 0.2% 65.4% 0 6.52G 3.85G 0|0 0|0 6.17k 59.6k 60 ys20220318 SLV May 18 08:19:44.318
-
explanation
-
Host
- (redisMongo03.yushei.com.tw:27017):, The hostname and port of the MongoDB instance being monitored.
-
insert (*0):
- Number of insert operations per second. A *0 indicates less frequent insert operations than the sampling interval can detect.
-
query (1):
- Number of query operations per second. Here, it's 1 query operation per second.
-
update (*0):
- Number of update operations per second. A *0 indicates less frequent update operations than the sampling interval can detect.
-
delete (*0):
- Number of delete operations per second. A *0 indicates less frequent delete operations than the sampling interval can detect.
-
getmore (3):
- Number of getmore operations per second, which are used to fetch more results from cursor queries.
-
command (4|0):
- Number of command operations per second. 4 indicates general database commands per second, and 0 might indicate additional sub-commands or context.
-
% dirty (0.2%):
- Percentage of data in the cache that is dirty and needs to be flushed to disk.
-
% used (65.4%):
- Percentage of the cache that is currently in use.
-
flushes (0):
- Number of flushes to disk per second.
-
vsize (6.52G):
- Virtual memory size used by the MongoDB process.
-
res (3.85G):
- Resident memory size (physical memory) used by the MongoDB process.
-
qr|qw (0|0):
- Queue lengths for clients waiting for read (qr) and write (qw) operations. Both are 0 here, indicating no clients are waiting.
-
ar|aw (0|0):
- Number of active clients performing read (ar) and write (aw) operations. Both are 0 here, indicating no active clients.
-
netIn (6.17k):
- Amount of network traffic coming into the MongoDB instance per second (6.17 kilobytes).
-
netOut (59.6k):
- Amount of network traffic going out of the MongoDB instance per second (59.6 kilobytes).
-
conn (60):
- Number of active connections to the MongoDB instance.
-
repl (ys20220318):
- A custom field or identifier related to the replica set configuration. This seems to be specific to your setup.
-
role (SLV):
- The role of the MongoDB instance in the replica set. SLV stands for Slave, which is a secondary node in the replica set.
-
timestamp (May 18 08:19:44.318):
- The timestamp when this statistic was recorded.
redisMongo04.yushei.com.tw:27017 *0 *0 *0 *0 0 1|0 0.1% 79.5% 0 4.70G 2.89G 0|0 0|0 263b 54.2k 24 ys20220318 SEC May 18 08:19:44.333
redisMongo05.yushei.com.tw:27017 *0 *0 *0 *0 0 2|0 0.3% 69.2% 0 4.05G 2.40G 0|0 0|0 849b 61.7k 23 ys20220318 SEC May 18 08:19:44.347
```
Host:
The hostname and port of the MongoDB instance being monitored (redisMongo03.yushei.com.tw:27017, etc.).
insert:
Number of insert operations per second (*0, *0, *0).
query:
Number of query operations per second (1, *0, *0).
update:
Number of update operations per second (*0, *0, *0).
delete:
Number of delete operations per second (*0, *0, *0).
getmore:
Number of getmore operations per second (used to fetch more results from cursor queries) (3, 0, 0).
command:
Number of command operations per second (general database commands) (4|0, 1|0, 2|0).
% dirty:
Percentage of dirty data in the cache (0.2%, 0.1%, 0.3%).
% used:
Percentage of the cache that is being used (65.4%, 79.5%, 69.2%).
flushes:
Number of flushes to disk per second (0, 0, 0).
vsize:
Virtual memory usage (6.52G, 4.70G, 4.05G).
res:
Resident memory usage (3.85G, 2.89G, 2.40G).
qr|qw:
Queue lengths for clients waiting for read and write operations (0|0, 0|0, 0|0).
ar|aw:
Active clients performing read and write operations (0|0, 0|0, 0|0).
netIn:
Network traffic in (amount of data received per second) (6.17k, 263b, 849b).
netOut:
Network traffic out (amount of data sent per second) (59.6k, 54.2k, 61.7k).
conn:
Number of active connections to the database (60, 24, 23).
time:
The timestamp of the report (May 18 08:19:44.318, May 18 08:19:44.333, May 18 08:19:44.347).
repl:
Replication status:
SLV: Slave (Secondary node).
SEC: Secondary node.
Interpreting the Data:
Operation Metrics: The insert, query, update, delete, getmore, and command columns show the rate of operations. A *0 means that the operation is occurring less frequently than the sampling interval can detect.
Memory Usage: vsize and res columns indicate virtual and resident memory usage. These values are important for understanding how much memory the MongoDB instance is consuming.
Cache Usage: The % dirty and % used columns provide insights into the cache's state. High dirty percentages can indicate that a lot of data needs to be written to disk.
Network Traffic: netIn and netOut show the network activity, which can indicate how much data is being received and sent by the MongoDB instance.
Connections and Clients: The conn column shows the number of active connections. High values here might suggest heavy usage or potential connection pooling issues.
Replication Status: The repl column shows the role of each member in the replica set (secondary nodes in this case).
By regularly monitoring these metrics, you can get a good sense of your MongoDB replica set's health and performance, allowing you to identify and address any issues promptly.