8

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

3 Answers 3

2

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.

1
  • 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
    Commented Dec 1, 2013 at 11:35
1

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.

-1

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

2
  • 2
    OP mentioned that he already looked at Monit.
    – Karlson
    Commented Jan 7, 2012 at 5:11
  • ah, damn. Reading is fundamental.
    – lhagemann
    Commented Jan 7, 2012 at 14:34

Not the answer you're looking for? Browse other questions tagged .