NAME
|
reboot, fsreboot, watchfossil – reboot the system upon loss of
file server connection |
SYNOPSIS
|
aux/reboot [ file ] aux/fsreboot [ file ]
aux/watchfossil |
DESCRIPTION
|
Reboot stats file, default /$cputype/init, once a minute. If the
stat fails, reboot reboots the system. If it times out, reboot
tries again later. This is used to restart diskless cpu servers
whenever their file server connection is broken. Fsreboot does the same, but reboots the machine whenever the stat fails, no matter the reason. Before doing so, it tries to write to the fossil console found at #s/fsrem the commands to sync and halt all file systems. This is used to restart a fossil file server if the file server is unresponsive but the kernel is still alive.
Watchfossil is the last resort. It spawns two processes. The first
tries to both create a process and read /sys every 15 seconds.
The second prepares to reboot the system and does so if after
1 minute the former process could not read the file. This is a
safeguard in case the process table gets full or fossil gets broken
or unresponsive, in the hope that rebooting will at least bring
the machine back into operation. Because of this, watchfossil
does not attempt to synchronize anything before rebooting. |
SOURCE
|
/sys/src/cmd/aux/fsreboot.c /sys/src/cmd/aux/reboot.c /sys/src/cmd/aux/watchfossil.c |