db.hostInfo()mongodまたはmongosが実行される基礎のシステムに関する情報をドキュメントを返します。 返されるフィールドの一部は、一部のプラットフォームにのみ含まれます。db.hostInfo()provides amongoshhelper method around thehostInfocommand. The 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().
互換性
このメソッドは、次の環境でホストされている配置で使用できます。
- MongoDB Atlas はクラウドでの MongoDB 配置のための完全管理サービスです
重要
このコマンドは、M0 および Flex クラスターではサポートされていません。詳細については、サポートされていないコマンド を参照してください。
MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン
MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン