Databases Reference
In-Depth Information
Do not attempt to connect a driver to the HTTP interface port, and do
not try to connect to the native driver port via HTTP. The driver port
handles only the native MongoDB wire protocol; it will not handle
HTTP requests. For example, if you go to
http://localhost:27017
in a web
browser, you will see:
You are trying to access MongoDB on the native driver port.
For http diagnostic access, add 1000 to the port number
Similarly, you cannot use the native MongoDB wire protocol when con-
necting on the admin interface's port.
serverStatus
The most basic tool for getting statistics about a running MongoDB server is the
serverStatus
command, which has the following output (exact keys present may vary
by platform/server version):
> db.runCommand({"serverStatus" : 1})
{
"version" : "1.5.3",
"uptime" : 166,
"localTime" : "Thu Jun 10 2010 15:47:40 GMT-0400 (EDT)",
"globalLock" : {
"totalTime" : 165984675,
"lockTime" : 91471425,
"ratio" : 0.551083556358441
},
"mem" : {
"bits" : 64,
"resident" : 101,
"virtual" : 2824,
"supported" : true,
"mapped" : 336
},
"connections" : {
"current" : 141,
"available" : 19859
},
"extra_info" : {
"note" : "fields vary by platform"
},
"indexCounters" : {
"btree" : {
"accesses" : 1563,
"hits" : 1563,
"misses" : 0,
"resets" : 0,
"missRatio" : 0
}
},
"backgroundFlushing" : {
"flushes" : 2,
"total_ms" : 44,