PROPHET/OS
NAME
watchdog: who is watched, and what resets the machine when it stands
SYNOPSIS
watchdog [--tui]
DESCRIPTION
Who is watched, and what resets the machine when it stands.
The supervisor catches a thread that **crashes** and starts it again. It does not catch a machine that **stands**: a hang with interrupts masked writes one line about a lock and then nothing happens, and a scheduler that stands writes not even that. This is the other half, and it has two.
The **software half** is the table. A thread registers a name and a deadline and reports itself alive; Limit is how long it may stay silent, Silent how long it has been, Longest the worst silence ever measured on it, and Findings how often its deadline ran out. A row whose State says missed stands out red. On miss says what is done after the finding is written: report means the finding and nothing else, end means its thread is asked to stop as well.
**The finding comes before the action, always.** Nothing is done about a missed report before the report is written down, because a reset that takes the reason with it is the silence this is all about.
The **hardware half** is the device, and it stands under the table with the software half beside it. It counts down and bites unless it is fed, and the feeder may feed only while every deadline in the table is kept: one standing thread is enough to stop the feeding, and a scheduler that stands feeds nothing at all. armed for is the deadline the device holds, refused how often the feeder was not allowed to say that the machine answers, and bites how often the device went off. A bite survives a restart of the board, so a machine that was reset by its watchdog knows it was and says so.
hardware no device on this board is the honest line and not an error: then a hang is found and said, and nothing outside the machine resets it.
The two threads in the table are the construction. watchdog walks the rounds and wdfeed feeds, each keeps a deadline of its own, and so neither can stand without the other noticing.
The rows come out of /state/watchdog, which stands behind no right: who is watched is a statement about the machine and not a look into the kernel.
--tui takes the whole screen and keeps the rows live; the arrows and the two page keys move, q leaves.
EXAMPLE
$ watchdog --help watchdog [--tui] who is watched, and what resets the machine when it stands --tui live on the whole screen, q leaves