Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm setting up mongod to run in an /etc/init.d script. This may be a nitpick, but is there a way to avoid this?

# service mongod start
Starting mongod:
forked process: 19820
all output going to /log/location/mongod.log
[SUCCESS]

Instead, I just want to see:

# service mongod start
Staring mongod:              [SUCCESS]
share|improve this question

2 Answers 2

up vote 2 down vote accepted

You might be able to change the line in your init.d script to something like this:

/path/to/mongod > /dev/null 2>/dev/null

That should suppress the output from mongod and just leave you with the output from the script. (the [SUCCESS] message)

share|improve this answer

mongod does take a --quiet flag; have you tried using that?

share|improve this answer
    
yes, quiet only makes the log quieter –  Brian Hicks Oct 12 '11 at 14:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.