AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。
Docs Menu

hostInfo(データベースコマンド)

hostInfo
次の値を返します。

mongodまたはmongosが実行される基礎のシステムに関する情報を含むドキュメント。 返されるフィールドの一部は、一部のプラットフォームにのみ含まれます。

You must run the hostInfo command, which takes no arguments, against the admin database.

このコマンドは、次の環境でホストされている配置で使用できます。

  • 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>
}
hostInfo

The document returned by the hostInfo.

hostInfo.system

mongodまたはmongosを実行しているシステムの基礎の環境に関する情報を提供する埋め込みドキュメント

hostInfo.system.currentTime

現在のシステム時間のタイムスタンプ。

hostInfo.system.hostname

システム名。Linux システム上のhostname -fの出力に対応する必要があります。

hostInfo.system.cpuAddrSize

システムのアーキテクチャを反映する数値。 32または64のいずれか。

hostInfo.system.memSizeMB

システムメモリ(RAM)の合計量(メガバイト単位)。

hostInfo.system.memLimitMB

メモリ使用量の制限(メガバイト単位)。

たとえば、コンテナで実行すると、システムメモリの合計よりも少ないメモリ制限が課される場合があります。 このメモリ上限は、システム メモリの合計ではなく、WiredTiger 内部キャッシュを計算するために使用できる最大 RAM として使用されます。

hostInfo.system.numCores

使用可能な論理プロセッサ コアの合計数。

hostInfo.system.numCoresAvailableToProcess

プロセスで使用可能な CPU コアの数。 コア数を検索するための基礎のシステム呼び出しが失敗した場合は、-1 を返します。

hostInfo.system.cpuArch

システム アーキテクチャを表す string。 x86またはx86_64のいずれか。

hostInfo.system.numaEnabled

ブール値。 falseがインターリーブされている場合(つまり 無効)、それ以外の場合はtrueです。

hostInfo.os

mongodとmongosを実行しているオペレーティング システムに関する情報を含む埋め込みドキュメント。

hostInfo.os.type

オペレーティング システムのタイプを表す string LinuxやWindowsなど)。

hostInfo.os.name

使用可能な場合、 はオペレーティング システムの表示名を返します。

hostInfo.os.version

使用可能な場合、 はディストリビューションまたはオペレーティング システムの名前を返します。

hostInfo.extra

An embedded document with extra information about the operating system and the underlying hardware. The content of the extra embedded 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.alwaysFullSync

alwaysFullSync は macOS システムでのみ表示されます。

hostInfo.extra.nfsAsync

nfsAsync は macOS システムでのみ表示されます。

hostInfo.extra.cpuFrequencyMHz

システムのプロセッサのクロック速度をメガバイト単位で報告します。

hostInfo.extra.cpuFeatures

プロセッサの機能フラグを報告します。 Linux システムでは、 /proc/cpuinfoがflagsフィールドに含むのと同じ情報が含まれます。

hostInfo.extra.pageSize

デフォルトのシステムページサイズをバイト単位で報告します。

hostInfo.extra.physicalCores

システムで使用可能な非 ハイパースレッディング コアの数を報告します。

physicalCores は macOS システムでのみ表示されます。

hostInfo.extra.numPages

numPages は Linux システムでのみ表示されます。

hostInfo.extra.maxOpenFiles

オープンファイルハンドルに関する現在のシステム制限を報告します。詳細については、「自己管理型配置の UNIX ulimit 設定」を参照してください。

maxOpenFiles は Linux システムでのみ表示されます。

hostInfo.extra.scheduler

Reports the active I/O scheduler. scheduler only appears on OS X systems.

このページを評価