This version of the documentation is archived and no longer
supported. View the current documentation to learn how to
upgrade your version of MongoDB.
db.hostInfo()Returns a document with information about the underlying system that the
mongodormongosruns on. Some of the returned fields are only included on some platforms.db.hostInfo()provides a helper in themongoshell around thehostInfoThe output ofdb.hostInfo()on a Linux system will resemble the following:{ "system" : { "currentTime" : ISODate("<timestamp>"), "hostname" : "<hostname>", "cpuAddrSize" : <number>, "memSizeMB" : <number>, "memLimitMB" : <number>, "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
hostInfofor full documentation of the output ofdb.hostInfo().