Alexander Leidinger

Just another weblog

Apr
30

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

I have an old sys­tem (only the hard­ware, it runs -cur­rent) which reboots itself from time to time (mostly dur­ing the daily periodic(8) run, but also dur­ing a lot of com­pil­ing (por­tup­grade)). There is no obvi­ous rea­son (no panic) 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­ity 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­server. If the web­server would start each time, nearly nobody would detect the reboot (root gets an EMail on each reboot via an @reboot crontab entry).

My prag­matic solu­tion (for ser­vices started via a good rc.d script which has a work­ing sta­tus com­mand) is a crontab entry which checks peri­od­i­cally 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.

GD Star Rat­ing
load­ing…
GD Star Rat­ing
load­ing…
Share/Save

Tags: , , , , , , , , ,
Aug
12

I got some­thing done in the last days

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

  • emu10k1 lower pri­or­ity on attach (allows emu10kx to attach when loaded too)
  • sade com­mit­ted (and code improved)

And I did some more things:

  • emu10kx fixes (sub­mit­ted by Yuriy)
  • enhance­ment of the bsd to linux 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).

GD Star Rat­ing
load­ing…
GD Star Rat­ing
load­ing…

Tags: , , , , , , , , ,