The buildInfo command is an administrative command which returns a build summary for the current mongod. buildInfo has the following prototype form:
{ buildInfo: 1 }
In the mongo shell, call buildInfo in the following form:
db.runCommand( { buildInfo: 1 } )
Example
The output document of buildInfo has the following form:
{
"version" : "<string>",
"gitVersion" : "<string>",
"sysInfo" : "<string>",
"loaderFlags" : "<string>",
"compilerFlags" : "<string>",
"allocator" : "<string>",
"versionArray" : [ <num>, <num>, <...> ],
"javascriptEngine" : "<string>",
"bits" : <num>,
"debug" : <boolean>,
"maxBsonObjectSize" : <num>,
"ok" : <num>
}
Consider the following documentation of the output of buildInfo:
The document returned by the buildInfo command.
The commit identifier that identifies the state of the code used to build the mongod.
A string that holds information about the operating system, hostname, kernel, date, and Boost version used to compile the mongod.
Changed in version 2.2.
The memory allocator that mongod uses. By default this is tcmalloc after version 2.2, and system before 2.2.
An array that conveys version information about the mongod instance. See version for a more readable version of this string.
Changed in version 2.4.
A string that reports the JavaScript engine used in the mongod instance. By default, this is V8 after version 2.4, and SpiderMonkey before 2.4.
A boolean. true when built with debugging options.
A number that reports the Maximum BSON Document Size.