public class ServerStatus extends AdminCommand
This is a helper class for retrieving the status of a MongoDB server. The results of this command will look like:
{ "host" : "mongos.example.com", "version" : "1.8.2", "process" : "mongos", "uptime" : 1403, "localTime" : ISODate("2011-12-06T00:11:56.822Z"), "mem" : { "resident" : 5, "virtual" : 621, "supported" : true }, "connections" : { "current" : 1, "available" : 818 }, "extra_info" : { "note" : "fields vary by platform", "heap_usage_bytes" : 94560, "page_faults" : 0 }, "opcounters" : { "insert" : 0, "query" : 9, "update" : 0, "delete" : 0, "getmore" : 0, "command" : 33 }, "ops" : { "sharded" : { "insert" : 0, "query" : 0, "update" : 0, "delete" : 0, "getmore" : 0, "command" : 0 }, "notSharded" : { "insert" : 0, "query" : 9, "update" : 0, "delete" : 0, "getmore" : 0, "command" : 33 } }, "shardCursorType" : { }, "asserts" : { "regular" : 0, "warning" : 0, "msg" : 0, "user" : 3, "rollovers" : 0 }, "network" : { "bytesIn" : 3205, "bytesOut" : 6698, "numRequests" : 45 }, "ok" : 1 }
Modifier and Type | Field and Description |
---|---|
static Document |
SERVER_STATUS
The serverStatus "query" document.
|
ADMIN_DATABASE
COMMAND_COLLECTION
HEADER_SIZE, myCollectionName, myDatabaseName
Constructor and Description |
---|
ServerStatus()
Create a new ServerStatus command.
|
equals, getCommand, getOperationName, getRoutingDocument, hashCode, isAllowJumbo, setAllowJumbo, size, toString, validateSize, write, write
finishHeader, getCollectionName, getDatabaseName, getReadPreference, getRequiredVersionRange, init, writeHeader, writeHeader
public static final Document SERVER_STATUS
Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.