how to get mongodb's loaded configuration file path -


I have to programmatically obtain the path of the configuration file, which is loading the mongodb. Is it possible to get it by running a command or something?

You can run a command in the Mongo shell but on admin the database that you Command line options will be used to start a Mongoode or Mongoose:

  db.runCommand {{getCmdLineOpts: 1}) {"argv": ["/ Usr / bin / mongod", "--config", "/etc/mongodb.conf"], "pars": {"config": "/etc/mongodb.conf", "net": {"" "" "" "" "" "" "," Port ":" port ": 27017}," storage ": {" dbPath ":" / var / lib / mongodb "}," systemlog ": {" destination ":" file "," logAppend ": true," path ":" /var/log/mongodb/mongodb.log "}}," OK ": 1}    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -