Cheap process mon­i­tor­ing (no addi­tion­al soft­ware required)

I have an old sys­tem (only the hard­ware, it runs ‑cur­rent) which reboots itself from time to time (most­ly dur­ing the dai­ly periodic(8) run, but also dur­ing a lot of com­pil­ing (por­tup­grade)). There is no obvi­ous rea­son (no pan­ic) why it is doing this. It could be that there is some hard­ware defect, or some­thing else. It is not impor­tant enough to get a high enough pri­or­i­ty that I try hard to ana­lyze the prob­lem with this machine. The annoy­ing part is, that some­times after a restart apache does not start. So if this hap­pens, the solu­tion is to login and start the web­serv­er. If the web­serv­er would start each time, near­ly nobody would detect the reboot (root gets an EMail on each reboot via an @reboot crontab entry).

My prag­mat­ic solu­tion (for ser­vices start­ed via a good rc.d script which has a work­ing sta­tus com­mand) is a crontab entry which checks peri­od­i­cal­ly if it is run­ning and which restarts the ser­vice if not. As an exam­ple for apache and an inter­val of 10 minutes:

*/10 * * * *    /usr/local/etc/rc.d/apache22 status >/dev/null 2>&1 || /usr/local/etc/rc.d/apache22 restart

For the use case of this service/machine, this is enough. In case of a prob­lem with the ser­vice, a mail with the restart out­put would arrive each time it runs, else only after a reboot for which the ser­vice did not restart.

I got some­thing done in the last days

Wow, some of the TODO items in the last post are done:

  • emu10k1 low­er pri­or­i­ty on attach (allows emu10kx to attach when loaded too)
  • sade com­mit­ted (and code improved)

And I did some more things:

  • emu10kx fix­es (sub­mit­ted by Yuriy)
  • enhance­ment of the bsd to lin­ux errno map­ping (sub­mit­ted by “Intron”)
  • added some more files to ObsoleteFiles.inc (sub­mit­ted by kris@)
  • had a look at linux_kdump and deter­mined that we should update it with what we have in ‑cur­rent

There’s also a sub­mis­sion of sup­port for Envy24HT chips from Kon­stan­tin (he also has a page with a lot of docs for envy* chips).