db.hostInfo()
db.
hostInfo
()- Returns a document with information about the underlying systemthat the
mongod
ormongos
runs on. Some of thereturned fields are only included on some platforms.
db.hostInfo()
provides a helper in the mongo
shell around the hostInfo
The output ofdb.hostInfo()
on a Linux system will resemble thefollowing:
- {
- "system" : {
- "currentTime" : ISODate("<timestamp>"),
- "hostname" : "<hostname>",
- "cpuAddrSize" : <number>,
- "memSizeMB" : <number>,
- "memLimitMB" : <number>, // Available starting in MongoDB 4.0.9 (and 3.6.13)
- "numCores" : <number>,
- "cpuArch" : "<identifier>",
- "numaEnabled" : <boolean>
- },
- "os" : {
- "type" : "<string>",
- "name" : "<string>",
- "version" : "<string>"
- },
- "extra" : {
- "versionString" : "<string>",
- "libcVersion" : "<string>",
- "kernelVersion" : "<string>",
- "cpuFrequencyMHz" : "<string>",
- "cpuFeatures" : "<string>",
- "pageSize" : <number>,
- "numPages" : <number>,
- "maxOpenFiles" : <number>
- },
- "ok" : <return>
- }
See hostInfo
for full documentation of the output ofdb.hostInfo()
.