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

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
add comment

1 Answer

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
add comment

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.