定義
getCmdLineOptsThe
getCmdLineOptscommand returns a document containing command line options used to start the givenmongodormongos. RungetCmdLineOptsin theadmindatabase.
互換性
このコマンドは、次の環境でホストされている配置で使用できます。
- MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
注意
This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.
MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン
MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン
構文
このコマンドの構文は、次のとおりです。
db.adminCommand( { getCmdLineOpts: 1 } )
出力
このコマンドは、 argvとparsedの 2 つのフィールドを持つドキュメントを返します。 argvフィールドには、string mongodまたはmongos を呼び出すために使用されるコマンド の各項目を含む配列が含まれています。parsedフィールドのドキュメントには、コマンドラインから解析されたものや構成ファイルで指定されたもの(指定されている場合)を含むすべてのランタイム オプションが含まれます。
Consider the following example output of getCmdLineOpts:
{ "argv" : [ "/usr/bin/mongod", "--config", "/etc/mongod.conf" ], "parsed" : { "config" : "/etc/mongod.conf", "net" : { "bindIp" : "127.0.0.1", "port" : 27017 }, "processManagement" : { "fork" : true }, "storage" : { "dbPath" : "/data/db" }, "systemLog" : { "destination" : "file", "logAppend" : true, "path" : "/var/log/mongodb/mongod.log" } }, "ok" : 1 }