Mongodb {serverStatus:1} 详细解释

本文深入剖析了MongoDB服务器状态的各项关键指标,包括版本、进程、运行时间、内存使用情况、连接数、锁状态、索引计数、后台刷新等,提供了全面的服务器健康检查指南。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

> db.serverStatus()
FieldExample ValueExplanation
hostmy.node.comThe hostname of this server
version1.8.0-rc1-pre-The version number of this server
processmongodWhat is the process? (mongod, mongos)
uptime14143Uptime in seconds
uptimeEstimate12710Uptime based on MongoDB's internal coarse grained timer
localTimeISODate("2011-03-01T05:30:16.682Z")The local time at this server (time is in UTC).
globalLock.totalTime14143457121The number of microseconds since startup that the global lock was created
globalLock.lockTime17166The number of microseconds that the global lock has been held since it was created
globalLock.ratio0.0000012137060870720337The ratio between lockTime & totalTime
globalLock.currentQueue.total12The current number of operations queued waiting for the global lock
globalLock.currentQueue.readers10The current number of operations queued waiting on a read lock
globalLock.currentQueue.writers2The current number of operations queued waiting for a write lock
globalLock.activeClients.total3Total number of active clients connected to this server
globalLock.activeClients.readers2The total number of active clients currently performing read operations
globalLock.activeClients.writers1The total number of active clients currently performing write operations
mem.bits64Is this a 32 or 64 bit architecture?
mem.resident20number of megabytes resident. It is typical over time, on a dedicated database server, for this number to approach the amount of physical ram on the box.
mem.virtual2502virtual megabytes for the mongod process. Generally virtual should be a little larger than mapped, but if virtual is many gigabytes larger, that could indicate a memory leak - with journalling, virtual is twice mapped
mem.supportedtrueWhether or not this machine supports extended memory info. If this is false, other values in 'mem' may not be present
mem.mapped80As MongoDB memory maps all the data files, this number is likely similar to your total database(s) size.
connections.current23The number of currently active connections to this server
connections.available50The number of available connections remaining
extra_info.heap_usage_bytes234342The number of bytes of heap used by this process. Only available on linux
extra_info.page_faults2523The number of page faults on this process. Only available on linux
indexCounters.btree.accesses2342The number of times the btree indexes have been accessed
indexCounters.btree.hits2340The number of times a btree page was in memory
indexCounters.btree.misses2The number of times a btree page was not in memory
indexCounters.btree.resets0The number of times the index counters have been reset to 0
indexCounters.btree.missRatio0The ratio of misses to hits on the btree
backgroundFlushing.flushes214The number of times the database has flushed writes to disk
backgroundFlushing.total_ms1357The total number of ms that the database has spent flushing data to disk
backgroundFlushing.average_ms6.341121495327103The average number of ms it takes to perform a single flush
backgroundFlushing.last_ms7The number of ms that the last flush took to complete
backgroundFlushing.last_finishedISODate("2011-03-01T05:29:44.124Z")The timestamp from when the last flush was completed
cursors.totalOpen0The total number of cursors that the server is maintaining for clients
cursors.clientCursors_size[deprecated] Same as cursors.totalOpen
cursors.timedOut0The number of cursors that have timed out since this server was started
network.bytesIn1430The total number of bytes sent to this database
network.bytesOut2140The total number of bytes sent from this database
network.numRequests20The total number of requests that have been sent to this database
repl.setNamemySetThe name of the replica set that this server is a part of
repl.ismastertrueWhether or not this node is the master of the replica set
repl.secondaryfalseWhether or not this node is a secondary of the replica set
repl.hosts[ "my.node.com:27017", "other.node.com:27017", "third.node.com:27017"]The set of hosts in this replica sets
opcounters.insert0The total number of inserts performed since this process started
opcounters.query9The total number of queries performed since this process started
opcounters.update0The total number of updates performed since this process started
opcounters.delete0The total number of deletes performed since this process started
opcounters.getmore0The total number of times getMore has been called on any cursor since this process started
opcounters.command13The total number of other commands performed since this process started
asserts.regular0The number of regular asserts raised since this process started
asserts.warning0The number of warnings raised since this process started
asserts.msg0The number of message asserts. These are internal server errors that have a well defined text string. Stack traces are logged for these
asserts.user0The number of user asserts. These are errors that can be generated by a user such as out of disk space or duplicate key
asserts.rollovers0The number of times the assert counters have rolled over since this process started
writeBacksQueuedfalseWhether or not there are any operations from a mongos that have to be retried
dur.commits0The number of commits to the journal that have occured in the last interval
dur.journaledMB0MBs of data written to the journal in the last interval
dur.writeToDataFilesMB0MBs of data written from journal to data files in the last interval
dur.commitsInWriteLock0The number of commits in the last interval which were in a write lock. Commits in a write lock are undesirable
dur.earlyCommits0Number of times a commit was requested before the scheduled time
dur.timeMs.dt3011The time length of the interval over which the dur statswere collected
dur.timeMs.prepLogBuffer0The amount of time spent preparing to write to the journal
dur.timeMs.writeToJournal0The amount of time spent actually writing to the journal
dur.timeMs.writeToDataFiles0The amount of time spent writing to datafiles after journaing
dur.timeMs.remapPrivateView0The amount of time spent remapping copy-on-write memory mapped views
ok1Whether or not serverStatus returned correctly

转载于:https://www.cnblogs.com/xuegang/archive/2011/08/30/2159356.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值