Database Reference
In-Depth Information
Getting the Server's Version
You can use the db. version() function to get the build and version information for a server. This information is useful
for determining whether upgrades are required or when reporting an issue to a support forum. The following snippet
shows how to use this command:
$mongo
> use admin
switched to db admin
> db.version()
version: 2.5.1-pre-
Getting the Server's Status
MongoDB provides a simple method for determining the status of a server.
Note
remember that your user will need permissions to run these commands if you are using auth .
The following example shows the information returned, including such things as server uptime, the maximum
number of connections, and so on:
$mongo
> db.serverStatus()
{
"host" : "Pixl.local",
"version" : "2.5.1-pre-",
"process" : "mongod",
"pid" : 3737,
"uptime" : 44,
"uptimeMillis" : NumberLong(43035),
"uptimeEstimate" : 39,
"localTime" : ISODate("2013-05-25T12:38:34.015Z"),
"asserts" : {
"regular" : 0,
"warning" : 0,
"msg" : 0,
"user" : 1,
"rollovers" : 0
},
"connections" : {
"current" : 1,
"available" : 2047,
"totalCreated" : NumberLong(1)
},
"cursors" : {
"totalOpen" : 0,
"clientCursors_size" : 0,
"timedOut" : 0
},
 
 
Search WWH ::




Custom Search