Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am looking for a simple process monitor for my account in a popular VPS. I loved Supervisor and Monit, but they seem overkill for me.

I want something

  1. that runs as a daemon (So my VPS account can start it on boot and also "start" by cron in case the monitor itself goes down)
  2. that monitors by spawning stuff as subprocess (like Supervisor) or by doing a polling command that returns true or false (like a BASH if statement)
  3. both easy to use (need minimal configuration) and production stable (somehow few software seems to satisfy both demands)
  4. Suitable in a managed VPS- run in user mode, minimum memory usage
share|improve this question

closed as too localized by random Apr 16 '13 at 16:10

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers 3

up vote 2 down vote accepted

You're looking for the program daemontools. (If this is what you meant by the "Supervisor" monitor, then feel free to ignore the rest of my answer.)

daemontools is a collection of tools for managing UNIX services.

supervise monitors a service. It starts the service and restarts the service if it dies. Setting up a new service is easy: all supervise needs is a directory with a run script that runs the service.

multilog saves error messages to one or more logs. It optionally timestamps each line and, for each log, includes or excludes lines matching specified patterns. It automatically rotates logs to limit the amount of disk space used. If the disk fills up, it pauses and tries again, without losing any data.

It's simple, flexible, and very powerful. The basic idea is that for each service you want to run, daemontools launches a child process (called supervise) that then launches your service. supervise configures the service's environment variables and uid/gid, and then keeps the service's standard in and standard out open so it can send signals. The service does not need to daemonize itself, and you don't have to manage pid files. The main service doesn't require root to run, and you can put the directories of monitored services anywhere.

share|improve this answer
    
runit would be an alternative to daemontools. It's also very simple and low-level. Basically all you need for running a proces is a file containing some exec command, e.g. exec sleep 300 Then you create a symlink from directory containing run script to /etc/service/name and your're done. –  Tombart Dec 1 '13 at 11:35

The simple answer is you already have one - Every Unix system does - init and /etc/inittab.

The job of init is to spawn the processes listed in inittab, monitor them and restart them if they exit.

share|improve this answer

Have you looked at monit? http://mmonit.com/monit/documentation/monit.html

share|improve this answer
2  
OP mentioned that he already looked at Monit. –  Karlson Jan 7 '12 at 5:11
    
ah, damn. Reading is fundamental. –  lhagemann Jan 7 '12 at 14:34

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