getCmdLineOpts
์ ์
getCmdLineOpts
getCmdLineOpts
๋ช ๋ น์ ์ง์ ๋mongod
๋๋mongos
์(๋ฅผ) ์์ํ๋ ๋ฐ ์ฌ์ฉ๋๋ ๋ช ๋ น์ค ์ต์ ์ด ํฌํจ๋ ๋ฌธ์๋ฅผ ๋ฐํํฉ๋๋ค.admin
๋ฐ์ดํฐ๋ฒ ์ด์ค์์getCmdLineOpts
๋ฅผ ์คํํฉ๋๋ค.
๊ตฌ๋ฌธ
๋ช ๋ น์ ๋ค์๊ณผ ๊ฐ์ ๊ตฌ๋ฌธ์ ๊ฐ์ง๋๋ค:
db.adminCommand( { getCmdLineOpts: 1 } )
์ถ๋ ฅ
์ด ๋ช
๋ น์ argv
๋ฐ parsed
๋ ํ๋๊ฐ ์๋ ๋ฌธ์๋ฅผ ๋ฐํํฉ๋๋ค. argv
ํ๋์๋ mongod
๋๋ mongos
์(๋ฅผ) ํธ์ถํ๋ ๋ฐ ์ฌ์ฉ๋๋ ๋ช
๋ น ๋ฌธ์์ด์ ๊ฐ ํญ๋ชฉ์ด ํฌํจ๋ ๋ฐฐ์ด์ด ํฌํจ๋์ด ์์ต๋๋ค. parsed
ํ๋์ ๋ฌธ์์๋ ๋ช
๋ น์ค์์ ๊ตฌ๋ฌธ ๋ถ์๋ ์ต์
๊ณผ ๊ตฌ์ฑ ํ์ผ(์ง์ ๋ ๊ฒฝ์ฐ)์ ์ง์ ๋ ์ต์
์ ํฌํจํ์ฌ ๋ชจ๋ ๋ฐํ์ ์ต์
์ด ํฌํจ๋์ด ์์ต๋๋ค.
๋ค์ 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 }