定義
互換性
このコマンドは、次の環境でホストされている配置で使用できます。
- MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
重要
This command is not supported in M0 and Flex clusters. For more information, see Unsupported Commands.
MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン
MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン
構文
db.adminCommand( { hostInfo: 1 } )
出力
In mongosh you can use db.hostInfo() as a helper to access hostInfo. The output of hostInfo on a Linux system will resemble the following:
{ "system" : { "currentTime" : ISODate("<timestamp>"), "hostname" : "<hostname>", "cpuAddrSize" : <number>, "memSizeMB" : <number>, "memLimitMB" : <number>, "numCores" : <number>, "numCoresAvailableToProcess" : <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> }
出力フィールド
hostInfoThe document returned by the
hostInfo.
hostInfo.system.memLimitMBメモリ使用量の制限(メガバイト単位)。
たとえば、コンテナで実行すると、システムメモリの合計よりも少ないメモリ制限が課される場合があります。 このメモリ上限は、システム メモリの合計ではなく、WiredTiger 内部キャッシュを計算するために使用できる最大 RAM として使用されます。
hostInfo.system.numCoresAvailableToProcessプロセスで使用可能な CPU コアの数。 コア数を検索するための基礎のシステム呼び出しが失敗した場合は、
-1を返します。
hostInfo.extraAn embedded document with extra information about the operating system and the underlying hardware. The content of the
extraembedded document depends on the operating system.
hostInfo.extra.cpuStringシステムのプロセッサの人間が判読できる説明を含む string。
cpuStringは macOS システムでのみ表示されます。
hostInfo.extra.versionStringオペレーティング システムのバージョンと識別の完全なstring 。 Linux と macOS システムでは、これには
uname -aのような出力が含まれます。
hostInfo.extra.libcVersionシステム
libcのリリース。libcVersionは Linux システムでのみ表示されます。
hostInfo.extra.kernelVersion現在使用されている Linux カーネルのリリース。
kernelVersionは Linux システムでのみ表示されます。
hostInfo.extra.alwaysFullSyncalwaysFullSyncは macOS システムでのみ表示されます。
hostInfo.extra.nfsAsyncnfsAsyncは macOS システムでのみ表示されます。
hostInfo.extra.physicalCoresシステムで使用可能な非 ハイパースレッディング コアの数を報告します。
physicalCoresは macOS システムでのみ表示されます。
hostInfo.extra.numPagesnumPagesは Linux システムでのみ表示されます。
hostInfo.extra.maxOpenFilesオープンファイルハンドルに関する現在のシステム制限を報告します。詳細については、「自己管理型配置の UNIX ulimit 設定」を参照してください。
maxOpenFilesは Linux システムでのみ表示されます。
hostInfo.extra.schedulerReports the active I/O scheduler.
scheduleronly appears on OS X systems.