Wednesday, August 9, 2017

How to check mongo process ID? How to check mongo status?

How to check mongo process ID:

ps -ax | grep -v grep | grep mongod
or
ps -aux | grep mongod
or

pgrep mongod

> 1017
--------------------------------------------------
Kill the process:

sudo kill -9 <PID>

Example:
sudo kill -9 1017
--------------------------------------------------
Check mongo Status:

Sudo systemctl status mongod
or
Sudo service mongod status

--------------------------------------------------
Start mongo service:

Sudo systemctl start mongod
or
Sudo service mongod start

--------------------------------------------------
Stop mongo service:

Sudo systemctl stop mongod
or
Sudo service mongod stop

No comments:

Post a Comment