check status of mongod code example
Example 1: how to check mongodb status in ubuntu
sudo systemctl status mongodb
Example 2: mongodb get status
db.runCommand( { serverStatus: 1 } )
sudo systemctl status mongodb
db.runCommand( { serverStatus: 1 } )