3

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.

macarthy
  • 193
  • 2
  • 6
  • What is the difference between a long-running process (that you `&` off into the background) and a daemon? :-) – voretaq7 Oct 06 '11 at 20:05
  • It is not started at boot/init for one. – macarthy Oct 06 '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 06 '11 at 20:28

1 Answers1

4

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

ewwhite
  • 194,921
  • 91
  • 434
  • 799