IS there a way that we can calculate how many ‘mongod’ instances are running on a single ubuntu server at a given time.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
On Ubuntu, the
psoutput of a runningmongodprocess will look something like this –mongodb 2210 3.3 1.5 259012 15300 pts/0 Dl 11:48 0:00 mongod –dbpath /var/tmp/mongotest –logpath /var/tmp/mongotest_log –port 3001
so you can follow Sergio’s solution. If you want to exclude the config server element (as it’s a mongod process also, see my comment)
Another way of checking would be to run –
as each mongod instance should (if it’s installed as per recommended) its own configuration file under
etc, e.g. /etc/mongodb.conf, /etc/mongodb1.conf, /etc/mongodb2.conf etc.Each mongod instance will have its own logpath and datapath, which you should find configured in the relevant configuration file under
etc. For example –so the previous command will also apply.
You may be interested in my answer on dba.stackexchange.com for more information on how to run multiple mongodb instances on Ubuntu using Upstart.