Ruby daemons - what is a monitor and how does it work?

So, Ruby gem descriptors let you set monitor=true when starting your process. What kind of monitor is this and what are you doing with it? All you do is specify true or false ... is something creating a log file somewhere? Something that actually controls the process, like god ? Why is the documentation that this thing is so terrible?

Or is this really a Unix thing everyone should know about? :)

+6
ruby monitor daemons
source share
1 answer

From the exact guide :

: monitor . Keep track of programs and restart damaged instances.

It looks like it sets the PID file (i.e. the file with the daemon process id) to track the daemon; if for some reason the daemon crashes, the monitor will restart it.

You will have to ask the authors why their documentation is so sparse; The source code looks clear enough to understand what is happening. I would think that anyone who built a demon or two would be familiar with the concept of monitoring and restarting them.

+5
source share

All Articles