- Reference >
- Database Commands >
- Diagnostic Commands >
- hostInfo
hostInfo¶
-
hostInfo¶ New in version 2.2.
Returns: A document with information about the underlying system that the mongodormongosruns on. Some of the returned fields are only included on some platforms.You must run the
hostInfocommand, which takes no arguments, against theadmindatabase. Consider the following invocations ofhostInfo:In the
mongoshell you can usedb.hostInfo()as a helper to accesshostInfo. The output ofhostInfoon a Linux system will resemble the following:Consider the following documentation of these fields:
-
hostInfo.system¶ A sub-document about the underlying environment of the system running the
mongodormongos
-
hostInfo.system.currentTime¶ A time stamp of the current system time.
-
hostInfo.system.hostname¶ The system name, which should correspond to the output of
hostname -fon Linux systems.
-
hostInfo.system.cpuAddrSize¶ A number reflecting the architecture of the system. Either
32or64.
-
hostInfo.system.memSizeMB¶ The total amount of system memory (RAM) in megabytes.
-
hostInfo.system.numCores¶ The total number of available logical processor cores.
-
hostInfo.system.cpuArch¶ A string that represents the system architecture. Either
x86orx86_64.
-
hostInfo.system.numaEnabled¶ A boolean value.
falseif NUMA is interleaved (i.e. disabled), otherwisetrue.
-
hostInfo.os¶ A sub-document that contains information about the operating system running the
mongodandmongos.
-
hostInfo.os.type¶ A string representing the type of operating system, such as
LinuxorWindows.
-
hostInfo.os.name¶ If available, returns a display name for the operating system.
-
hostInfo.os.version¶ If available, returns the name of the distribution or operating system.
-
hostInfo.extra¶ A sub-document with extra information about the operating system and the underlying hardware. The content of the
extrasub-document depends on the operating system.
-
hostInfo.extra.versionString¶ A complete string of the operating system version and identification. On Linux and OS X systems, this contains output similar to
uname -a.
-
hostInfo.extra.libcVersion¶ The release of the system
libc.libcVersiononly appears on Linux systems.
-
hostInfo.extra.kernelVersion¶ The release of the Linux kernel in current use.
kernelVersiononly appears on Linux systems.
-
hostInfo.extra.alwaysFullSync¶ alwaysFullSynconly appears on OS X systems.
-
hostInfo.extra.cpuFrequencyMHz¶ Reports the clock speed of the system’s processor in megahertz.
-
hostInfo.extra.cpuFeatures¶ Reports the processor feature flags. On Linux systems this the same information that
/proc/cpuinfoincludes in theflagsfields.
-
hostInfo.extra.pageSize¶ Reports the default system page size in bytes.
-
hostInfo.extra.maxOpenFiles¶ Reports the current system limits on open file handles. See UNIX ulimit Settings for more information.
maxOpenFilesonly appears on Linux systems.
-