MongoDB status query: Db.serverstatus ()

Source: Internet
Author: User
Tags local time mongodb version

See also: http://www.2cto.com/database/201501/370191.html

Basic information

Spock:primary>db.serverstatus ()

{

"Host": "h6.corp.yongche.org",//Host name

"Version": "2.6.2",//mongodb version

"Process": "Mongod",//mongodb process, mainly Mongod and MONGOs (in a shard cluster) two

"pid": Numberlong (4205),//mongod PID process number, can be verified with the Pidof mongod command of the shell

"Uptime": 173120, the number of seconds that the//mongod service has survived since it started

"Uptimemillis": Numberlong (173119573),//mongod the number of milliseconds that have survived since the start of the service

"Uptimeestimate": 172173, the number of surviving seconds calculated internally by//mongod

"LocalTime": Isodate ("2014-12-31t06:41:01.029z")//local time

Lock information

MongoDB has 4 kinds of locks: r,r,w,w

R: Represents a global read lock

W: Global Write lock

R: a database read lock

W: a Database write lock

Spock:primary>db.serverstatus (). Locks

{

"." : {

"Timelockedmicros": {

"R": Numberlong (2532219), the total number of microseconds that all libraries hold global read locks after//mongod startup

"W": Numberlong (2022505)//Mongod The total number of microseconds that all libraries hold global write locks after startup

},

"Timeacquiringmicros": {

"R": Numberlong (1489378),//Mongod total number of microseconds for lock waits for all library global read locks after startup

"W": Numberlong (361350)//Mongod total number of microseconds for lock waits for all library global write locks after startup

}

},

"Admin": {

"Timelockedmicros": {

"R": Numberlong (277350),//Mongod the admin database has read lock time after startup

"W": Numberlong (0)//Mongod after startup The admin database holds the write lock time

},

"Timeacquiringmicros": {

"R": Numberlong (11011),//Mongod lock waiting time after startup of the admin database

"W": Numberlong (0)//Mongod lock waiting time for read lock of admin database after startup

}

},

"Local": {

"Timelockedmicros": {

"R": Numberlong (29750564),

"W": Numberlong (737)

},

"Timeacquiringmicros": {

"R": Numberlong (4074456),

"W": Numberlong (46)

}

},

"Jiangjianjian": {

"Timelockedmicros": {

"R": Numberlong (935802), read lock time of Jiangjianjian database after//mongod startup

"W": Numberlong (98)//Mongod after startup Jiangjianjian The write-lock time held by the database

},

"Timeacquiringmicros": {

"R": Numberlong (262185),//Mongod lock wait time for read lock on Jiangjianjian database after startup

"W": Numberlong (9)//Mongod Lock wait time for write lock of Jiangjianjian database after startup

}

},

"Test": {

"Timelockedmicros": {

"R": Numberlong (719696),

"W": Numberlong (141)

},

"Timeacquiringmicros": {

"R": Numberlong (332797),

"W": Numberlong (10)

}

}

}

Global Lock Information

Spock:primary>db.serverstatus (). GlobalLock

{

"TotalTime": Numberlong ("172059990000"), total time after//mongod start up to now, unit microseconds

"LockTime": Numberlong (2031058), total time of global lock lock after//mongod startup, in microseconds

"Currentqueue": {

"Total": 0,//number of current global lock waits for lock waits

"Readers": 0,//current global read lock wait Count

"Writers": 0//Current global write lock wait Count

},

"Activeclients": {

"Total": 0,//number of active clients currently

"Readers": 0,//number of read operations currently active in the client

"Writers": 0//Number of write operations currently active in the client

}

}

Memory information

Bj1-farm1:primary>db.serverstatus (). Mem

{

"Bits": 64,//number of operating system bits

"Resident": 45792,//physical memory consumption, Unit m

"Virtual": 326338,//dummy memory consumption

"Supported": TRUE,//TRUE indicates support for displaying additional memory information

"Mapped": 161399,//mapped memory

"Mappedwithjournal": 322798//In addition to mapping memory also includes journal log consumption of mapped memory

}

For a description of MongoDB memory refer to my Blog

http://blog.csdn.net/cug_jiang126com/article/details/42264895

Connection number Information

Bj1-farm1:primary>db.serverstatus (). connections

{

"Current": 2581,//number of connections

"Available": 48619,//number of available connections

"Totalcreated": Numberlong (187993238)//Total number of connections created so far

}

You can see that the maximum number of connections for the current Mongod is 51200=2581+48619

Additional Information

Bj1-farm1:primary>db.serverstatus (). Extra_info

{

"Note": "Fields vary byplatform",//indicates that the current display information for this extra_info depends on the underlying system

"Heap_usage_bytes": 206033064,//number of bytes occupied by heap memory space, only available for Linux

"Page_faults": 11718117//Database when accessing data when the data is not in memory when the number of pages, when the database performance is poor or the amount of data is very large, this value will rise significantly

}

Index statistical information

Bj1-farm1:primary>db.serverstatus (). indexcounters

{

"Accesses": 35369670951,//number of index visits, the larger the value, the better your index overall, and if the value grows very slowly, there is a problem with the system-built index.

"Hits": 35369213426,//index hit count, the larger the value, the better the index is used Mogond

"Misses": 0,//indicates the number of times Mongod tries to use the index when it is not in memory, the smaller the better

"Resets": 0,//counter reset number of times

"Missratio": 0//loss rate, i.e. misses divided by hits value

}

Background refresh Information

Bj1-farm1:primary>db.serverstatus (). backgroundflushing

{

"Flushes": 171675,//Database flush writes to disk The total number of times, will gradually grow

"Total_ms": 432943335,//mongod write data to disk total time consumed, unit MS,

"Average_ms": 2521.8775884665793,//ratio of the above two values, representing the average time of each write disk

"Last_ms": 5329,//The time spent on the last write disk, MS, combined with the last average to observe mongd overall write performance and current write performance

"Last_finished": Isodate ("2014-12-31t07:39:11.881z")//time of last write completion

}

Cursor information

Bj1-farm1:primary>db.serverstatus (). Cursors

{

"Note": "Deprecated,use Server Status Metrics",//indicates that you can also use the B.serverstatus (). metrics.cursor command to see

"Clientcursors_size": 2,//mongodb the number of cursors currently maintained for the client

"Totalopen": 2,//Same as Clientcursors_size

"pinned": 0,//number of cursors with open pinned type

"Totalnotimeout": 0,//Set the number of cursors opened after a period of inactivity, that is, after the parameter "DBQuery.Option.noTimeout" value is not set

"TimedOut": 11//The number of cursor timeouts since Mongod startup, if this value is large or growing, it may show that the current application has errors

}

Network Information

Bj1-farm1:primary>db.serverstatus (). Network

{

"Bytesin": Numberlong ("1391919214603"),//The number of network bytes received by the database, which can be used to see if expected expectations are reached

"Bytesout": Numberlong ("1669479449423"),//number of bytes sent from the database for network transmission

"Numrequests": The total number of requests received by 5186060375//mongod

}

Replica set Information

Bj1-farm1:primary>db.serverstatus (). repl

{

"SetName": "Bj1-farm1",//Replica set name

"Setversion": 4,//current version, 1 per modified configuration

"IsMaster": true,//whether the current node is master

"Secondary": false,//whether the current node is slave

"Hosts": [//Replica set composition

"172.16.0.150:27017",

"172.16.0.152:27017",

"172.16.0.151:27017"

],

"PRIMARY": "172.16.0.150:27017", the IP address where the//master resides

"Me": "172.16.0.150:27017"//IP address of the current node

}

More about replica set management and introduction see my Blog

http://blog.csdn.net/cug_jiang126com/article/details/41943237

Operation counters for replica sets

Bj1-farm1:primary>db.serverstatus (). Opcountersrepl

{

"Insert": 599,//Mongod replication The number of inserts after the most recent boot

"Query": 0,

"Update": 0,

"Delete": 0,

"Getmore": 0,

"Command": 0

}

Operating counter

Bj1-farm1:primary>db.serverstatus (). opcounters

{

"Insert": 17476744,//mongod the number of inserts after the most recent boot

"Query": 4923585,//mongod query number after the most recent startup

"Update": 445136,//mongod update number after last boot

"Delete": 301953,//mongod Delete number after the most recent startup

"Getmore": 28737548,//Mongod the number of Getmore after the most recent boot, this value can be high because the child node sends the Getmore command as part of the data copy operation

"Command": 32844821////mongod The number of execution command commands after the most recent startup

}

Asserts

Bj1-farm1:primary>db.serverstatus (). Asserts

{

"Regular": 65,//The number of normal asserts errors after service startup, you can view more of this information via log

"Warning": 1,//number of warning after service startup

"MSG": 0,//message assert number after service startup

"User": 30655213,//number of user asserts after service startup

"rollovers": 0//Number of resets after service startup

}

writebacksqueued

Bj1-farm1:primary>db.serverstatus (). writebacksqueued

False//If TRUE indicates that there is an operation that needs to be re-executed, if False indicates no

Persistence (dur)

Bj1-farm1:primary>db.serverstatus (). Dur

{

"Commits": 29,//The number of commits written to journal after the last packet commit interval

"JOURNALEDMB": 1.089536,//After the last packet commit interval, the size of the write journal, in units m

"WRITETODATAFILESMB": 2.035345,//the size of the data file written from journal after the last packet commit interval

"Compression": Compression rate of 0.49237888647866956,//journal log

"Commitsinwritelock": 0,//The number of write locks at the time of submission, you can use this value to determine the current system's write pressure

"Earlycommits": 0,//The number of times a commit was requested before the grouping commit interval. Use this value to determine the packet commit interval, which is whether the journal group Commitinterval is set reasonably

"Timems": {

"DT": 3060,//time spent collecting data, Unit ms

"Preplogbuffer": 7,//The time spent preparing to write journal, Unit MS, the smaller the value, the better the journal Performance

"Writetojournal": 36,//Real time spent writing journal, unit MS, this value and file system and hardware device related

"Writetodatafiles": 34,//time spent writing from journal to data file, Unit ms

"Remapprivateview": 18//Remap memory time spent, unit MS, lower value indicates journal performance better

}

}

If the group commit interval is set, the item also displays the Journalcommitintervalms information, which is the commit interval, by default, 100ms.

Record status information

Bj1-farm1:primary>db.serverstatus (). recordstats

{

"Accessesnotinmemory": 4444249,//The total number of times the memory was not found when accessing data

"Pagefaultexceptionsthrown": 22198,//Total number of exceptions thrown due to page faults

"Yc_driver": {

"Accessesnotinmemory": 53441,

"Pagefaultexceptionsthrown": 18067

},

"Yc_foot_print": {

"Accessesnotinmemory": 0,

"Pagefaultexceptionsthrown": 0

}

Working Set Configuration

Bj1-farm1:primary>db.serverstatus ({workingset:1}). workingset

{

"Note": "Thisisanestimate",//Comment

"Pagesinmemory": 736105,//overseconds the number of pages in memory, the default page size is 4k; If your dataset is smaller than memory, the value is converted to size, which is the size of the dataset; You can use that value to evaluate the size of the actual working set.

"Computationtimemicros": 232590,//The time taken to collect working set data, in microseconds, to collect this information can affect server performance, please note the frequency of collecting working set

"Overseconds": 502//The amount of time spent in memory from the latest data to the oldest data page, in seconds. If the value is decreasing, or the value is small, the working set is already larger than the memory value, and if the value is large, the data set <= memory value

}

Metrics

Bj1-farm1:primary>db.serverstatus (). Metrics

{

"Cursor": {//cursor information has been described above

"TimedOut": Numberlong (12),

"Open": {

"Notimeout": Numberlong (0),

"Pinned": Numberlong (0),

"Total": Numberlong (2)

}

},

"Document": {

"Deleted": Numberlong (4944851),//delete the total number of records

"Inserted": Numberlong (1066509660),//Total number of records inserted

"Returned": Numberlong ("4594388182"),//Returns the total number of records

"Updated": Numberlong (27275088)//Update the total number of records

},

"GetLastError": {

"Wtime": {

"num": 0,//w>1 number of GetLastError

"Totalmillis": 0//Time

},

"Wtimeouts": Numberlong (0)//number of timeouts

},

This section details the official documentation

http://docs.mongodb.org/manual/reference/command/getLastError/#dbcmd. GetLastError

http://docs.mongodb.org/manual/reference/command/serverStatus/#metrics

"Operation": {

"Fastmod": Numberlong (23990485),//Add data record with $inc operation, and the column does not use an indexed update number

"Idhack": Numberlong (0),//number of queries using the _id column, which MongoDB uses _id index by default and skips query plan resolution

"Scanandorder": Numberlong (33042)//number of times the index cannot be used for sorting

},

"Queryexecutor": {

"Scanned": Numberlong ("334236661328319"),//Total number of rows scanned in query or query plan

"Scannedobjects": Numberlong ("776725143947")//

},

"Record": {

"Moves": Numberlong (44166)//The total number of times the document was moved on the hard disk

},

"Repl": {

"Apply": {

"Batches": {

"num": 162,//Oplog number of application processes for slave nodes in replica set

"Totalmillis"://mongod total time spent working from Oplog

},

"OPS": Total number of Numberlong (599)//oplog operations

},

"Buffer": {

"Count": Numberlong (0), current number of operations in//oplog buffer

"Maxsizebytes": 268435456, maximum value of//oplog buffer, constant, non-configurable

"Sizebytes": Numberlong (0)//current size of Oplog buffer

},

"Network": {

"bytes": Numberlong (282864),//total size of the total data read from the replication source

"Getmores": {

"num": 164,//number of getmores operations performed

"Totalmillis": Total time spent 15595//getmores operation

},

"Ops": Numberlong (599),//Total number of operations read from replication source

"Readerscreated": Numberlong (//oplog) The number of query thread creation, when sending a connection,timeout, or network operation, re-select the replication source, this value will increase

},

"Preload": {

"Docs": {

"num": 0,

"Totalmillis": 0

},

"Indexes": {

"num": 2396,

"Totalmillis": 0

}

}

},

"Storage": {

"Freelist": {

"Search": {

"Bucketexhausted": Numberlong (0),

"Requests": Numberlong (1091000085),

"Scanned": Numberlong (1139483866)

}

}

},

"TTL": {

"Deleteddocuments": Numberlong (1015082231),//Number of times the TTL index was used

"Passes": Numberlong (174032)//The number of times the document was deleted using the TTL index

}

}

MongoDB status query: Db.serverstatus ()

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.