getCmdLineOpts command

The getCmdLineOpts command return both raw and formatted versions of the command line options used to start mongod.

use admin
db.runCommand({getCmdLineOpts: 1})
{
	"argv" : [
		"mongod",
		"--replSet",
		"replica-set-foo",
		"--logpath",
		"/data/mongod.log",
		"--oplogSize",
		"512",
		"--nojournal",
		"--dbpath",
		"/data/rs-30000",
		"--port",
		"30000",
		"--fork"
	],
	"parsed" : {
		"dbpath" : "/data/rs-30000",
		"fork" : true,
		"logpath" : "/data/mongod.log",
		"nojournal" : true,
		"oplogSize" : 512,
		"port" : 30000,
		"replSet" : "replica-set-foo"
	},
	"ok" : 1
}

The "parsed" section is new in version 2.x

Follow @mongodb

MongoDB Pittsburgh - May 15
MongoNYC - May 23
MongoDB Paris - Jun 14
MongoDB UK - Jun 20
MongoDC - June 26


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

PLEASE POST QUESTIONS IN THE USER GROUPS FORUM. Post non-question comments and helpful hints here.

blog comments powered by Disqus