user626206
user626206

Reputation: 687

While running mongo as daemon process,If mongo get crashed and restarted how to confirm that?

I am running Mongodb server as an daemon process,I suspect that the mongo gets crashed and restarted. Is there any file available to confirm the crash.I believe that everyone acquainted about mysql if its get killed and restarted. we can confirm by checking the file. In that same way we do have a file in Mongodb to check it?

Upvotes: 1

Views: 534

Answers (1)

thkala
thkala

Reputation: 86403

By default mongod sends its logs to stdout. From the mongod --help output:

--logpath arg         file to send all output to instead of stdout
--logappend           append to logpath instead of over-writing

i.e. you can specifiy a log file for the daemon - or you could just use a shell redirection.

You should have a look at how your deamon process is started to find if and where a log file is written.

Some information on your system might also help us be more helpful.

Upvotes: 3

Related Questions