Superblock updating: sync and update daemon

Jim Jagielski jim at jagubox.gsfc.nasa.gov
Thu Nov 22 01:44:25 AEST 1990


One of the keys to the health and welfare of the Unix file system is the
validity and integrity of it's Superblock(s). Frequent updating of it, using
sync, assures up-to-date info.

On many BSD systems, there is a background daemon called update which syncs the
system every 30 seconds (or so). This daemon isn't present under A/UX, but
it is kinda implemented via init, which syncs every 5 minutes (or so). In many
cases, this is simply not enough.

One way of achieving this is via cron, but if you have cron do a sync every
1/2 - 1 minute, it's going to make a VERY large log file. Much better to do
it in C...

Anyway, I've written updated.c (for update daemon). It's run in the background
and started at boot time (hence, you'll need to add a line to /etc/inittab).
It sinces the system every 90 seconds (by default) and logs it's progress
every 12 hours (by default). Sync delay is an optional command-line argument,
and default sync delay, log-time, etc... are all cc -D "definables".

Since my Mac will be down over the long weekend (I'll be back up 11/26), I'll
make it available via anon-ftp on this Monday.

Gobble gobble :)
--
=======================================================================
#include <std/disclaimer.h>
                                 =:^)
           Jim Jagielski                    NASA/GSFC, Code 711.1
     jim at jagubox.gsfc.nasa.gov               Greenbelt, MD 20771

"Kilimanjaro is a pretty tricky climb. Most of it's up, until you reach
 the very, very top, and then it tends to slope away rather sharply."



More information about the Comp.unix.aux mailing list