serverStatus(options?)
This method returns a document that provides an overview of the database process’s state.
Syntax:
db.serverStatus(options?)
Example
MongoDB
db.serverStatus()
Output
{"host" : "DESKTOP-MP73JVQ","version" : "5.0.6","process" : "C:\\Program Files\\MongoDB\\Server\\5.0\\bin\\mongod.exe","pid" : NumberLong(4092),"uptime" : 182939,"uptimeMillis" : NumberLong(182938923),"uptimeEstimate" : NumberLong(182938),"localTime" : ISODate("2022-07-19T15:34:29.928Z"),"asserts" : {"regular" : 0,"warning" : 0,"msg" : 0,"user" : 28,"tripwire" : 0,"rollovers" : 0},"catalogStats" : {"collections" : 2,"capped" : 0,"timeseries" : 0,"views" : 0,"internalCollections" : 6,"internalViews" : 0},"connections" : {"current" : 1,"available" : 999999,"totalCreated" : 3,"active" : 1,"threaded" : 1,"exhaustIsMaster" : 0,"exhaustHello" : 0,"awaitingTopologyChanges" : 0},"electionMetrics" : {"stepUpCmd" : {"called" : NumberLong(0),"successful" : NumberLong(0)},"priorityTakeover" : {"called" : NumberLong(0),"successful" : NumberLong(0)},"catchUpTakeover" : {"called" : NumberLong(0),"successful" : NumberLong(0)},"electionTimeout" : {"called" : NumberLong(0),"successful" : NumberLong(0)},"freezeTimeout" : {"called" : NumberLong(0),"successful" : NumberLong(0)},"numStepDownsCausedByHigherTerm" : NumberLong(0),"numCatchUps" : NumberLong(0),"numCatchUpsSucceeded" : NumberLong(0),"numCatchUpsAlreadyCaughtUp" : NumberLong(0),"numCatchUpsSkipped" : NumberLong(0),"numCatchUpsTimedOut" : NumberLong(0),"numCatchUpsFailedWithError" : NumberLong(0),"numCatchUpsFailedWithNewTerm" : NumberLong(0),"numCatchUpsFailedWithReplSetAbortPrimaryCatchUpCmd" : NumberLong(0),"averageCatchUpOps" : 0},"extra_info" : {"note" : "fields vary by platform","page_faults" : 92210,"usagePageFileMB" : 244,"totalPageFileMB" : 9206,"availPageFileMB" : 2883,"ramMB" : 5878},"flowControl" : {"enabled" : true,"targetRateLimit" : 1000000000,"timeAcquiringMicros" : NumberLong(1705),"locksPerKiloOp" : 0,"sustainerRate" : 0,"isLagged" : false,"isLaggedCount" : 0,"isLaggedTimeMicros" : NumberLong(0)},"freeMonitoring" : {"state" : "undecided"},"globalLock" : {"totalTime" : NumberLong("182939984000"),"currentQueue" : {"total" : 0,"readers" : 0,"writers" : 0},"activeClients" : {"total" : 0,"readers" : 0,"writers" : 0}},"locks" : {"ParallelBatchWriterMode" : {"acquireCount" : {"r" : NumberLong(277)}},"ReplicationStateTransition" : {"acquireCount" : {"w" : NumberLong(61652)}},"Global" : {"acquireCount" : {"r" : NumberLong(61537),"w" : NumberLong(268),"W" : NumberLong(5)}},"Database" : {"acquireCount" : {"r" : NumberLong(8),"w" : NumberLong(267),"R" : NumberLong(1),"W" : NumberLong(1)}},"Collection" : {"acquireCount" : {"r" : NumberLong(12),"w" : NumberLong(265),"W" : NumberLong(2)}},................................................................................................................
No comments:
Post a Comment