Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to start a long running, memory/disk/cpu intensive process on Linux, and monitor it so I can :

  • check it terminates with a good status code,
  • collect stats (mem cpu disk every x minutes )
  • alert / restart if the process is flapping

Is there anything out there like that? I know of software to watch services/daemons, but not a long running process, on an ad hoc basis.

share|improve this question
What is the difference between a long-running process (that you & off into the background) and a daemon? :-) – voretaq7 Oct 6 '11 at 20:05
It is not started at boot/init for one. – macarthy Oct 6 '11 at 20:06
Not all daemons are started at boot. The only practial difference here is you expect your program to exit when it's done. Would one of your daemon-watching tools work? – voretaq7 Oct 6 '11 at 20:28

This is a good candidate for Monit, which is one of the tags on this question.

Using Monit, you'll be able to see process status, memory usage, CPU usage, runtime and other details. Monit will allow you to track the process via name pattern or PID. You'll also have a control to start, stop or restart the process.

enter image description here

share|improve this answer

Your Answer


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.