As I know there is a script called ubic-watchdog that runs under cron.
It knows what services should be up and if they are down ubic-wathcdog
starts them.
If I run "ps aux|grep ubic" on machine running ubic I will see several
process of ubic-guardian. I'm a bit confused with it's purpose. From
it's name one can thing that it should work just like watchdog, but
I'm not sure that this is right. My first question is what is the
purpose of ubic-guardian.
At
early stages of ubic development, there was an idea that usual pidfiles
are unsafe: presence of pidfile doesn't guarantee that process is still
alive, and presence of process with pid from pidfile in ps doesn't
guarantee it either.
So we thought about daemons which hold lock
on pifile for a whole lifetime. This way Linux kernel does the job for
us and we can be sure that locked pifile == process is alive.
Since
ubic is all about separation of programs and
damonizing/watchdog/metadata, we needed external process to hold that
lock. Hence, ubic-guardian.
(BTW, ubic-guardian is not a separate script. It is just a part of Ubic::Daemon code which replaces $0.)
After installing ubic from deb file, 2 things are placed in cron: ubic-
watchdog and ubic-update. There is a short description about second
one in "man ubic-update", but I still don't understand what it does
and why does it need to be run every minute. This is my second
question.
By the way, there is a small misspell in "man ubic-update". In
SYNOPSIS section the script is called ubic-date. =)
Thanks in advance for the answers!