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
AWAIT_DATA_FLAG_BIT, DEFAULT_BATCH_SIZE, EXHAUST_FLAG_BIT, NO_CURSOR_TIMEOUT_FLAG_BIT, OPLOG_REPLAY_FLAG_BIT, PARTIAL_FLAG_BIT, REPLICA_OK_FLAG_BIT, TAILABLE_CURSOR_FLAG_BIT
HEADER_SIZE, myCollectionName, myDatabaseName
Constructor and Description |
---|
ServerStatus()
Create a new ServerStatus command.
|
equals, getBatchSize, getLimit, getNumberToReturn, getNumberToSkip, getQuery, getReturnFields, hashCode, isAwaitData, isBatchSizeSet, isExhaust, isLimitSet, isNoCursorTimeout, isPartial, isTailable, validateSize, write
getCollectionName, getDatabaseName, getReadPreference, init, writeHeader
public static final Document SERVER_STATUS
Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.