【MongoDB】db.serverStatus()

1.查看mongodb服务器状态 

> db.serverStatus()
{
	"host" : "mysql57",
	"version" : "4.0.2",
	"process" : "mongod",
	"pid" : NumberLong(3403),
	"uptime" : 5976,
	"uptimeMillis" : NumberLong(5976052),
	"uptimeEstimate" : NumberLong(5976),
	"localTime" : ISODate("2024-06-14T04:01:50.070Z"),
	"asserts" : {
		"regular" : 0,
		"warning" : 0,
		"msg" : 0,
		"user" : 117,
		"rollovers" : 0
	},
	"connections" : {
		"current" : 1,
		"available" : 499,
		"totalCreated" : 25
	},
	"extra_info" : {
		"note" : "fields vary by platform",
		"page_faults" : 4
	},
	"freeMonitoring" : {
		"state" : "undecided"
	},
	"globalLock" : {
		"totalTime" : NumberLong("5976032000"),
		"currentQueue" : {
			"total" : 0,
			"readers" : 0,
			"writers" : 0
		},
		"activeClients" : {
			"total" : 12,
			"readers" : 0,
			"writers" : 0
		}
	},
	"locks" : {
		"Global" : {
			"acquireCount" : {
				"r" : NumberLong(24753),
				"w" : NumberLong(287),
				"W" : NumberLong(5)
			},
			"acquireWaitCount" : {
				"W" : NumberLong(1)
			},
			"timeAcquiringMicros" : {
				"W" : NumberLong(631)
			}
		},
		"Database" : {
			"acquireCount" : {
				"r" : NumberLong(9228),
				"w" : NumberLong(219),
				"R" : NumberLong(4),
				"W" : NumberLong(68)
			},
			"acquireWaitCount" : {
				"r" : NumberLong(1),
				"w" : NumberLong(1)
			},
			"timeAcquiringMicros" : {
				"r" : NumberLong(1516),
				"w" : NumberLong(2440)
			}
		},
		"Collection" : {
			"acquireCount" : {
				"r" : NumberLong(9217),
				"w" : NumberLong(237)
			}
		}
	},
	"logicalSessionRecordCache" : {
		"activeSessionsCount" : 1,
		"sessionsCollectionJobCount" : 20,
		"lastSessionsCollectionJobDurationMillis" : 0,
		"lastSessionsCollectionJobTimestamp" : ISODate("2024-06-14T03:57:15.957Z"),
		"lastSessionsCollectionJobEntriesRefreshed" : 0,
		"lastSessionsCollectionJobEntriesEnded" : 0,
		"lastSessionsCollectionJobCursorsClosed" : 0,
		"transactionReaperJobCount" : 0,
		"lastTransactionReaperJobDurationMillis" : 0,
		"lastTransactionReaperJobTimestamp" : ISODate("2024-06-14T02:22:15.943Z"),
		"lastTransactionReaperJobEntriesCleanedUp" : 0
	},
	"network" : {
		"bytesIn" : NumberLong(134724),
		"bytesOut" : NumberLong(1546438),
		"physicalBytesIn" : NumberLong(134724),
		"physicalBytesOut" : NumberLong(1546438),
		"numRequests" : NumberLong(968),
		"compression" : {
			"snappy" : {
				"compressor" : {
					"bytesIn" : NumberLong(0),
					"bytesOut" : NumberLong(0)
				},
				"decompressor" : {
					"bytesIn" : NumberLong(0),
					"bytesOut" : NumberLong(0)
				}
			}
		},
		"serviceExecutorTaskStats" : {
			"executor" : "passthrough",
			"threadsRunning" : 1
		}
	},
	"opLatencies" : {
		"reads" : {
			"latency" : NumberLong(9061),
			"ops" : NumberLong(31)
		},
		"writes" : {
			"latency" : NumberLong(52607),
			"ops" : NumberLong(16)
		},
		"commands" : {
			"latency" : NumberLong(218129),
			"ops" : NumberLong(920)
		},
		"transactions" : {
			"latency" : NumberLong(0),
			"ops" : NumberLong(0)
		}
	},
	"opcounters" : {
		"insert" : 216,
		"query" : 14,
		"update" : 7,
		"delete" : 0,
		"getmore" : 8,
		"command" : 954
	},
	"opcountersRepl" : {
		"insert" : 0,
		"query" : 0,
		"update" : 0,
		"delete" : 0,
		"getmore" : 0,
		"command" : 0
	},
	"storageEngine" : {
		"name" : "wiredTiger",
		"supportsCommittedReads" : true,
		"supportsSnapshotReadConcern" : true,
		"readOnly" : false,
		"persistent" : true
	},
	"tcmalloc" : {
		"generic" : {
			"current_allocated_bytes" : 72045968,
			"heap_size" : 108818432
		},
		"tcmalloc" : {
			"pageheap_free_bytes" : 35008512,
			"pageheap_unmapped_bytes" : 4096,
			"max_total_thread_cache_bytes" : NumberLong(1073741824),
			"current_total_thread_cache_bytes" : 878248,
			"total_free_bytes" : 1759856,
			"central_cache_free_bytes" : 344392,
			"transfer_cache_free_bytes" : 537216,
			"thread_cache_free_bytes" : 878248,
			"aggressive_memory_decommit" : 0,
			"pageheap_committed_bytes" : 108814336,
			"pageheap_scavenge_count" : 1,
			"pageheap_commit_count" : 48,
			"pageheap_total_commit_bytes" : 142376960,
			"pageheap_decommit_count" : 1,
			"pageheap_total_decommit_bytes" : 33562624,
			"pageheap_reserve_count" : 47,
			"pageheap_total_reserve_bytes" : 108818432,
			"spinlock_total_delay_ns" : 0,
			"formattedString" : "------------------------------------------------\nMALLOC:       72046544 (   68.7 MiB) Bytes in use by application\nMALLOC: +     35008512 (   33.4 MiB) Bytes in page heap freelist\nMALLOC: +       344392 (    0.3 MiB) Bytes in central cache freelist\nMALLOC: +       537216 (    0.5 MiB) Bytes in transfer cache freelist\nMALLOC: +       877672 (    0.8 MiB) Bytes in thread cache freelists\nMALLOC: +      1368320 (    1.3 MiB) Bytes in malloc metadata\nMALLOC:   ------------\nMALLOC: =    110182656 (  105.1 MiB) Actual memory used (physical + swap)\nMALLOC: +         4096 (    0.0 MiB) Bytes released to OS (aka unmapped)\nMALLOC:   ------------\nMALLOC: =    110186752 (  105.1 MiB) Virtual address space used\nMALLOC:\nMALLOC:            700              Spans in use\nMALLOC:             20              Thread heaps in use\nMALLOC:           4096              Tcmalloc page size\n------------------------------------------------\nCall ReleaseFreeMemory() to release freelist memory to the OS (via madvise()).\nBytes released to the OS take up virtual address space but no physical memory.\n"
		}
	},
	"transactions" : {
		"retriedCommandsCount" : NumberLong(0),
		"retriedStatementsCount" : NumberLong(0),
		"transactionsCollectionWriteCount" : NumberLong(0),
		"currentActive" : NumberLong(0),
		"currentInactive" : NumberLong(0),
		"currentOpen" : NumberLong(0),
		"totalAborted" : NumberLong(0),
		"totalCommitted" : NumberLong(0),
		"totalStarted" : NumberLong(0)
	},
	"transportSecurity" : {
		"1.0" : NumberLong(0),
		"1.1" : NumberLong(0),
		"1.2" : NumberLong(0)
	},
	"wiredTiger" : {
		"uri" : "statistics:",
		"LSM" : {
			"application work units currently queued" : 0,
			"merge work units currently queued" : 0,
			"rows merged in an LSM tree" : 0,
			"sleep for LSM checkpoint throttle" : 0,
			"sleep for LSM merge throttle" : 0,
			"switch work units currently queued" : 0,
			"tree maintenance operations discarded" : 0,
			"tree maintenance operations executed" : 0,
			"tree maintenance operations scheduled" : 0,
			"tree queue hit maximum" : 0
		},
		"async" : {
			"current work queue length" : 0,
			"maximum work queue length" : 0,
			"number of allocation state races" : 0,
			"number of flush calls" : 0,
			"number of operation slots viewed for allocation" : 0,
			"number of times operation allocation failed" : 0,
			"number of times worker found no work" : 0,
			"total allocations" : 0,
			"total compact calls" : 0,
			"total insert calls" : 0,
			"total remove calls" : 0,
			"total search calls" : 0,
			"total update calls" : 0
		},
		"block-manager" : {
			"blocks pre-loaded" : 14,
			"blocks read" : 106,
			"blocks written" : 299,
			"bytes read" : 458752,
			"bytes written" : 1744896,
			"bytes written for checkpoint" : 1732608,
			"mapped blocks read" : 0,
			"mapped bytes read" : 0
		},
		"cache" : {
			"application threads page read from disk to cache count" : 13,
			"application threads page read from disk to cache time (usecs)" : 2542,
			"application threads page write from cache to disk count" : 154,
			"application threads page write from cache to disk time (usecs)" : 10936,
			"bytes belonging to page images in the cache" : 45990,
			"bytes belonging to the lookaside table in the cache" : 182,
			"bytes currently in the cache" : 156854,
			"bytes not belonging to page images in the cache" : 110864,
			"bytes read into cache" : 46015,
			"bytes written from cache" : 627202,
			"checkpoint blocked page eviction" : 0,
			"eviction calls to get a page" : 55,
			"eviction calls to get a page found queue empty" : 53,
			"eviction calls to get a page found queue empty after locking" : 0,
			"eviction currently operating in aggressive mode" : 0,
			"eviction empty score" : 0,
			"eviction passes of a file" : 0,
			"eviction server candidate queue empty when topping up" : 0,
			"eviction server candidate queue not empty when topping up" : 0,
			"eviction server evicting pages" : 0,
			"eviction server slept, because we did not make progress with eviction" : 23,
			"eviction server unable to reach eviction goal" : 0,
			"eviction state" : 32,
			"eviction walk target pages histogram - 0-9" : 0,
			"eviction walk target pages histogram - 10-31" : 0,
			"eviction walk target pages histogram - 128 and higher" : 0,
			"eviction walk target pages histogram - 32-63" : 0,
			"eviction walk target pages histogram - 64-128" : 0,
			"eviction walks abandoned" : 0,
			"eviction walks gave up because they restarted their walk twice" : 0,
			"eviction walks gave up because they saw too many pages and found no candidates" : 0,
			"eviction walks gave up because they saw too many pages and found too few candidates" : 0,
			"eviction walks reached end of tree" : 0,
			"eviction walks started from root of tree" : 0,
			"eviction walks started from saved location in tree" : 0,
			"eviction worker thread active" : 4,
			"eviction worker thread created" : 0,
			"eviction worker thread evicting pages" : 2,
			"eviction worker thread removed" : 0,
			"eviction worker thread stable number" : 0,
			"failed eviction of pages that exceeded the in-memory maximum count" : 0,
			"failed eviction of pages that exceeded the in-memory maximum time (usecs)" : 0,
			"files with active eviction walks" : 0,
			"files with new eviction walks started" : 0,
			"force re-tuning of eviction workers once in a while" : 0,
			"hazard pointer blocked page eviction" : 1,
			"hazard pointer check calls" : 2,
			"hazard pointer check entries walked" : 1,
			"hazard pointer maximum array length" : 2,
			"in-memory page passed criteria to be split" : 0,
			"in-memory page splits" : 0,
			"internal pages evicted" : 0,
			"internal pages split during eviction" : 0,
			"leaf pages split during eviction" : 0,
			"lookaside score" : 0,
			"lookaside table entries" : 0,
			"lookaside table insert calls" : 0,
			"lookaside table remove calls" : 0,
			"maximum bytes configured" : 3856662528,
			"maximum page size at eviction" : 0,
			"modified pages evicted" : 7,
			"modified pages evicted by application threads" : 0,
			"operations timed out waiting for space in cache" : 0,
			"overflow pages read into cache" : 0,
			"page split during eviction deepened the tree" : 0,
			"page written requiring lookaside records" : 0,
			"pages currently held in the cache" : 35,
			"pages evicted because they exceeded the in-memory maximum count" : 0,
			"pages evicted because they exceeded the in-memory maximum time (usecs)" : 0,
			"pages evicted because they had chains of deleted items count" : 0,
			"pages evicted because they had chains of deleted items time (usecs)" : 0,
			"pages evicted by application threads" : 0,
			"pages queued for eviction" : 0,
			"pages queued for urgent eviction" : 2,
			"pages queued for urgent eviction during walk" : 0,
			"pages read into cache" : 28,
			"pages read into cache after truncate" : 22,
			"pages read into cache after truncate in prepare state" : 0,
			"pages read into cache requiring lookaside entries" : 0,
			"pages read into cache requiring lookaside for checkpoint" : 0,
			"pages read into cache skipping older lookaside entries" : 0,
			"pages read into cache with skipped lookaside entries needed later" : 0,
			"pages read into cache with skipped lookaside entries needed later by checkpoint" : 0,
			"pages requested from the cache" : 6147,
			"pages seen by eviction walk" : 0,
			"pages selected for eviction unable to be evicted" : 1,
			"pages walked for eviction" : 0,
			"pages written from cache" : 155,
			"pages written requiring in-memory restoration" : 0,
			"percentage overhead" : 8,
			"tracked bytes belonging to internal pages in the cache" : 6790,
			"tracked bytes belonging to leaf pages in the cache" : 150064,
			"tracked dirty bytes in the cache" : 0,
			"tracked dirty pages in the cache" : 0,
			"unmodified pages evicted" : 0
		},
		"connection" : {
			"auto adjusting condition resets" : 533,
			"auto adjusting condition wait calls" : 36978,
			"detected system time went backwards" : 0,
			"files currently open" : 21,
			"memory allocations" : 129919,
			"memory frees" : 128098,
			"memory re-allocations" : 25437,
			"pthread mutex condition wait calls" : 99280,
			"pthread mutex shared lock read-lock calls" : 46049,
			"pthread mutex shared lock write-lock calls" : 6936,
			"total fsync I/Os" : 447,
			"total read I/Os" : 1533,
			"total write I/Os" : 559
		},
		"cursor" : {
			"cursor create calls" : 183,
			"cursor insert calls" : 754,
			"cursor modify calls" : 0,
			"cursor next calls" : 441,
			"cursor operation restarted" : 0,
			"cursor prev calls" : 55,
			"cursor remove calls" : 82,
			"cursor reserve calls" : 0,
			"cursor reset calls" : 6089,
			"cursor search calls" : 3630,
			"cursor search near calls" : 178,
			"cursor sweep buckets" : 35960,
			"cursor sweep cursors closed" : 20,
			"cursor sweep cursors examined" : 1015,
			"cursor sweeps" : 5990,
			"cursor update calls" : 0,
			"cursors cached on close" : 411,
			"cursors reused from cache" : 366,
			"truncate calls" : 0
		},
		"data-handle" : {
			"connection data handles currently active" : 38,
			"connection sweep candidate became referenced" : 0,
			"connection sweep dhandles closed" : 18,
			"connection sweep dhandles removed from hash list" : 90,
			"connection sweep time-of-death sets" : 409,
			"connection sweeps" : 2981,
			"session dhandles swept" : 52,
			"session sweep attempts" : 135
		},
		"lock" : {
			"checkpoint lock acquisitions" : 137,
			"checkpoint lock application thread wait time (usecs)" : 1,
			"checkpoint lock internal thread wait time (usecs)" : 0,
			"commit timestamp queue lock application thread time waiting (usecs)" : 0,
			"commit timestamp queue lock internal thread time waiting (usecs)" : 0,
			"commit timestamp queue read lock acquisitions" : 0,
			"commit timestamp queue write lock acquisitions" : 0,
			"dhandle lock application thread time waiting (usecs)" : 1,
			"dhandle lock internal thread time waiting (usecs)" : 0,
			"dhandle read lock acquisitions" : 24873,
			"dhandle write lock acquisitions" : 259,
			"metadata lock acquisitions" : 100,
			"metadata lock application thread wait time (usecs)" : 7,
			"metadata lock internal thread wait time (usecs)" : 0,
			"read timestamp queue lock application thread time waiting (usecs)" : 0,
			"read timestamp queue lock internal thread time waiting (usecs)" : 0,
			"read timestamp queue read lock acquisitions" : 0,
			"read timestamp queue write lock acquisitions" : 0,
			"schema lock acquisitions" : 225,
			"schema lock application thread wait time (usecs)" : 1717,
			"schema lock internal thread wait time (usecs)" : 0,
			"table lock application thread time waiting for the table lock (usecs)" : 0,
			"table lock internal thread time waiting for the table lock (usecs)" : 0,
			"table read lock acquisitions" : 0,
			"table write lock acquisitions" : 83,
			"txn global lock application thread time waiting (usecs)" : 0,
			"txn global lock internal thread time waiting (usecs)" : 0,
			"txn global read lock acquisitions" : 294,
			"txn global write lock acquisitions" : 255
		},
		"log" : {
			"busy returns attempting to switch slots" : 16163,
			"force archive time sleeping (usecs)" : 0,
			"log bytes of payload data" : 77655,
			"log bytes written" : 114816,
			"log files manually zero-filled" : 0,
			"log flush operations" : 59223,
			"log force write operations" : 65356,
			"log force write operations skipped" : 65252,
			"log records compressed" : 87,
			"log records not compressed" : 48,
			"log records too small to compress" : 289,
			"log release advances write LSN" : 106,
			"log scan operations" : 6,
			"log scan records requiring two reads" : 0,
			"log server thread advances write LSN" : 104,
			"log server thread write LSN walk skipped" : 6860,
			"log sync operations" : 211,
			"log sync time duration (usecs)" : 115230,
			"log sync_dir operations" : 1,
			"log sync_dir time duration (usecs)" : 2,
			"log write operations" : 424,
			"logging bytes consolidated" : 114304,
			"maximum log file size" : 104857600,
			"number of pre-allocated log files to create" : 2,
			"pre-allocated log files not ready and missed" : 1,
			"pre-allocated log files prepared" : 2,
			"pre-allocated log files used" : 0,
			"records processed by log scan" : 13,
			"slot close lost race" : 0,
			"slot close unbuffered waits" : 0,
			"slot closures" : 210,
			"slot join atomic update races" : 0,
			"slot join calls atomic updates raced" : 0,
			"slot join calls did not yield" : 424,
			"slot join calls found active slot closed" : 0,
			"slot join calls slept" : 0,
			"slot join calls yielded" : 0,
			"slot join found active slot closed" : 0,
			"slot joins yield time (usecs)" : 0,
			"slot transitions unable to find free slot" : 0,
			"slot unbuffered writes" : 0,
			"total in-memory size of compressed records" : 115806,
			"total log buffer size" : 33554432,
			"total size of compressed records" : 58134,
			"written slots coalesced" : 0,
			"yields waiting for previous log file close" : 0
		},
		"perf" : {
			"file system read latency histogram (bucket 1) - 10-49ms" : 50,
			"file system read latency histogram (bucket 2) - 50-99ms" : 0,
			"file system read latency histogram (bucket 3) - 100-249ms" : 0,
			"file system read latency histogram (bucket 4) - 250-499ms" : 0,
			"file system read latency histogram (bucket 5) - 500-999ms" : 0,
			"file system read latency histogram (bucket 6) - 1000ms+" : 0,
			"file system write latency histogram (bucket 1) - 10-49ms" : 0,
			"file system write latency histogram (bucket 2) - 50-99ms" : 0,
			"file system write latency histogram (bucket 3) - 100-249ms" : 0,
			"file system write latency histogram (bucket 4) - 250-499ms" : 0,
			"file system write latency histogram (bucket 5) - 500-999ms" : 0,
			"file system write latency histogram (bucket 6) - 1000ms+" : 0,
			"operation read latency histogram (bucket 1) - 100-249us" : 2,
			"operation read latency histogram (bucket 2) - 250-499us" : 6,
			"operation read latency histogram (bucket 3) - 500-999us" : 0,
			"operation read latency histogram (bucket 4) - 1000-9999us" : 0,
			"operation read latency histogram (bucket 5) - 10000us+" : 0,
			"operation write latency histogram (bucket 1) - 100-249us" : 2,
			"operation write latency histogram (bucket 2) - 250-499us" : 1,
			"operation write latency histogram (bucket 3) - 500-999us" : 0,
			"operation write latency histogram (bucket 4) - 1000-9999us" : 0,
			"operation write latency histogram (bucket 5) - 10000us+" : 0
		},
		"reconciliation" : {
			"fast-path pages deleted" : 0,
			"page reconciliation calls" : 158,
			"page reconciliation calls for eviction" : 3,
			"pages deleted" : 6,
			"split bytes currently awaiting free" : 0,
			"split objects currently awaiting free" : 0
		},
		"session" : {
			"open cursor count" : 22,
			"open session count" : 19,
			"table alter failed calls" : 0,
			"table alter successful calls" : 37,
			"table alter unchanged and skipped" : 111,
			"table compact failed calls" : 0,
			"table compact successful calls" : 0,
			"table create failed calls" : 0,
			"table create successful calls" : 22,
			"table drop failed calls" : 0,
			"table drop successful calls" : 22,
			"table rebalance failed calls" : 0,
			"table rebalance successful calls" : 0,
			"table rename failed calls" : 0,
			"table rename successful calls" : 0,
			"table salvage failed calls" : 0,
			"table salvage successful calls" : 0,
			"table truncate failed calls" : 0,
			"table truncate successful calls" : 0,
			"table verify failed calls" : 0,
			"table verify successful calls" : 0
		},
		"thread-state" : {
			"active filesystem fsync calls" : 0,
			"active filesystem read calls" : 0,
			"active filesystem write calls" : 0
		},
		"thread-yield" : {
			"application thread time evicting (usecs)" : 0,
			"application thread time waiting for cache (usecs)" : 0,
			"connection close blocked waiting for transaction state stabilization" : 0,
			"connection close yielded for lsm manager shutdown" : 0,
			"data handle lock yielded" : 0,
			"get reference for page index and slot time sleeping (usecs)" : 0,
			"log server sync yielded for log write" : 0,
			"page access yielded due to prepare state change" : 0,
			"page acquire busy blocked" : 0,
			"page acquire eviction blocked" : 0,
			"page acquire locked blocked" : 0,
			"page acquire read blocked" : 0,
			"page acquire time sleeping (usecs)" : 0,
			"page delete rollback time sleeping for state change (usecs)" : 0,
			"page reconciliation yielded due to child modification" : 0
		},
		"transaction" : {
			"commit timestamp queue insert to empty" : 0,
			"commit timestamp queue inserts to tail" : 0,
			"commit timestamp queue inserts total" : 0,
			"commit timestamp queue length" : 0,
			"number of named snapshots created" : 0,
			"number of named snapshots dropped" : 0,
			"prepared transactions" : 0,
			"prepared transactions committed" : 0,
			"prepared transactions currently active" : 0,
			"prepared transactions rolled back" : 0,
			"query timestamp calls" : 1,
			"read timestamp queue insert to empty" : 0,
			"read timestamp queue inserts to head" : 0,
			"read timestamp queue inserts total" : 0,
			"read timestamp queue length" : 0,
			"rollback to stable calls" : 0,
			"rollback to stable updates aborted" : 0,
			"rollback to stable updates removed from lookaside" : 0,
			"set timestamp calls" : 0,
			"set timestamp commit calls" : 0,
			"set timestamp commit updates" : 0,
			"set timestamp oldest calls" : 0,
			"set timestamp oldest updates" : 0,
			"set timestamp stable calls" : 0,
			"set timestamp stable updates" : 0,
			"transaction begins" : 463,
			"transaction checkpoint currently running" : 0,
			"transaction checkpoint generation" : 101,
			"transaction checkpoint max time (msecs)" : 14,
			"transaction checkpoint min time (msecs)" : 0,
			"transaction checkpoint most recent time (msecs)" : 0,
			"transaction checkpoint scrub dirty target" : 0,
			"transaction checkpoint scrub time (msecs)" : 0,
			"transaction checkpoint total time (msecs)" : 151,
			"transaction checkpoints" : 100,
			"transaction checkpoints skipped because database was clean" : 0,
			"transaction failures due to cache overflow" : 0,
			"transaction fsync calls for checkpoint after allocating the transaction ID" : 100,
			"transaction fsync duration for checkpoint after allocating the transaction ID (usecs)" : 0,
			"transaction range of IDs currently pinned" : 0,
			"transaction range of IDs currently pinned by a checkpoint" : 0,
			"transaction range of IDs currently pinned by named snapshots" : 0,
			"transaction range of timestamps currently pinned" : 0,
			"transaction range of timestamps pinned by a checkpoint" : 0,
			"transaction range of timestamps pinned by the oldest timestamp" : 0,
			"transaction sync calls" : 0,
			"transactions committed" : 61,
			"transactions rolled back" : 402,
			"update conflicts" : 0
		},
		"concurrentTransactions" : {
			"write" : {
				"out" : 0,
				"available" : 128,
				"totalTickets" : 128
			},
			"read" : {
				"out" : 1,
				"available" : 127,
				"totalTickets" : 128
			}
		}
	},
	"mem" : {
		"bits" : 64,
		"resident" : 84,
		"virtual" : 933,
		"supported" : true,
		"mapped" : 0,
		"mappedWithJournal" : 0
	},
	"metrics" : {
		"commands" : {
			"_mergeAuthzCollections" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(3)
			},
			"buildInfo" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(2)
			},
			"count" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(13)
			},
			"create" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(5)
			},
			"createIndexes" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(26)
			},
			"drop" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(9)
			},
			"find" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(14)
			},
			"getFreeMonitoringStatus" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(1)
			},
			"getLog" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(1)
			},
			"getMore" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(8)
			},
			"getParameter" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(3)
			},
			"insert" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(22)
			},
			"isMaster" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(213)
			},
			"listCollections" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(22)
			},
			"listDatabases" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(3)
			},
			"listIndexes" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(6)
			},
			"logout" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(128)
			},
			"ping" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(15)
			},
			"replSetGetStatus" : {
				"failed" : NumberLong(2),
				"total" : NumberLong(2)
			},
			"saslContinue" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(300)
			},
			"saslStart" : {
				"failed" : NumberLong(1),
				"total" : NumberLong(151)
			},
			"serverStatus" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(45)
			},
			"top" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(5)
			},
			"update" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(7)
			},
			"whatsmyuri" : {
				"failed" : NumberLong(0),
				"total" : NumberLong(1)
			}
		},
		"cursor" : {
			"timedOut" : NumberLong(0),
			"open" : {
				"noTimeout" : NumberLong(0),
				"pinned" : NumberLong(0),
				"total" : NumberLong(0)
			}
		},
		"document" : {
			"deleted" : NumberLong(0),
			"inserted" : NumberLong(108),
			"returned" : NumberLong(156),
			"updated" : NumberLong(6)
		},
		"getLastError" : {
			"wtime" : {
				"num" : 0,
				"totalMillis" : 0
			},
			"wtimeouts" : NumberLong(0)
		},
		"operation" : {
			"scanAndOrder" : NumberLong(0),
			"writeConflicts" : NumberLong(0)
		},
		"queryExecutor" : {
			"scanned" : NumberLong(87),
			"scannedObjects" : NumberLong(148)
		},
		"record" : {
			"moves" : NumberLong(0)
		},
		"repl" : {
			"executor" : {
				"pool" : {
					"inProgressCount" : 0
				},
				"queues" : {
					"networkInProgress" : 0,
					"sleepers" : 0
				},
				"unsignaledEvents" : 0,
				"shuttingDown" : false,
				"networkInterface" : "DEPRECATED: getDiagnosticString is deprecated in NetworkInterfaceTL"
			},
			"apply" : {
				"attemptsToBecomeSecondary" : NumberLong(0),
				"batches" : {
					"num" : 0,
					"totalMillis" : 0
				},
				"ops" : NumberLong(0)
			},
			"buffer" : {
				"count" : NumberLong(0),
				"maxSizeBytes" : NumberLong(0),
				"sizeBytes" : NumberLong(0)
			},
			"initialSync" : {
				"completed" : NumberLong(0),
				"failedAttempts" : NumberLong(0),
				"failures" : NumberLong(0)
			},
			"network" : {
				"bytes" : NumberLong(0),
				"getmores" : {
					"num" : 0,
					"totalMillis" : 0
				},
				"ops" : NumberLong(0),
				"readersCreated" : NumberLong(0)
			},
			"preload" : {
				"docs" : {
					"num" : 0,
					"totalMillis" : 0
				},
				"indexes" : {
					"num" : 0,
					"totalMillis" : 0
				}
			}
		},
		"storage" : {
			"freelist" : {
				"search" : {
					"bucketExhausted" : NumberLong(0),
					"requests" : NumberLong(0),
					"scanned" : NumberLong(0)
				}
			}
		},
		"ttl" : {
			"deletedDocuments" : NumberLong(1),
			"passes" : NumberLong(99)
		}
	},
	"ok" : 1
}

db.serverStatus();
--可以查看的内容  
1.当前连接数,最大连接数。
2.启动时间,版本,机器名称,进程号  
3.全局锁信息 
4.数据库锁信息。
5.逻辑会话缓存信息
6.网络IO情况 
7.读写延迟情况 
8.读写各种操作的数量 
9.复制操作的数量 
10.存储引擎,隔离级别 
11.tcp内存使用情况 
12.事务情况
13.存储引擎TigerWire  LSM合并树。 
14.异步同步 
15.块管理 
16.缓存情况 
17.内存分配 
18.游标使用情况 
19.数据处理,检查点信息 
20.日志信息 
21.文件系统读取延迟情况
22.会话信息 ,线程信息 
23.并发事务 
24.命令执行情况 
  

2.查看集合的统计信息。

> db.stats() 
{
	"db" : "test",
	"collections" : 2,
	"views" : 0,
	"objects" : 30,
	"avgObjSize" : 89.86666666666666,
	"dataSize" : 2696,
	"storageSize" : 32768,
	"numExtents" : 0,
	"indexes" : 2,
	"indexSize" : 32768,
	"fsUsedSize" : 30284161024,
	"fsTotalSize" : 53660876800,
	"ok" : 1
}

统计信息可以查看各个对象数量,记录条数,大小等。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值