PROPHET/OS

NAME

warden: what the kernel watch looked at, and what it found broken

SYNOPSIS

warden [--tui]

DESCRIPTION

What the kernel watch looked at, and what it found broken.

The warden is the third of the three guards. The Zoll stands at the border to ring 3 and turns the wrong value away before it comes in, the Supervisor heals what falls anyway, and between them lies the kernel's own state, which has to be right as long as nothing is broken. The warden looks at it once a second and keeps a book:

watched            how often it looked
checked            invariants checked, over all looks
broken             how many of them were found broken
last_broken        the name of the last one, or a dash
tables             the tables of function pointers it guards
watches_at_once    how many watches ever ran at the same time

broken above zero turns red, and last_broken with it. The last one is the row that says what, not only that something is wrong. An invariant whose name is longer than twenty three characters arrives cut, because that is what a row of this kind can carry to a program; the whole name stands in /state/warden.

watches_at_once is a measured guarantee and no count of work. It must be one: the watch thread, the Supervisor after a heal and a self-test all watch, and two at once would share one book. It used to rest on a lock that was created on first use without any protection, and then two really did run at once, so the number is measured instead of claimed.

What it checks are invariants of the kernel itself: the free frames against the bitmap, the free list of the heap with its pattern, the active threads against the threads in the ring, the protection bits that W^X hangs on, and the sums of the tables that carry function pointers in writable memory. A soft one is read without a lock and only booked, a hard one is read under the lock and stops the kernel, named, because computing on spoiled memory falls later and without a trace.

**It is not per module**, and that is the subject and not a gap. What a module did, how often it came up again and how often it fell stands per module in mods, in the columns Starts and Errors: that is the Supervisor's book. tables says how many tables the watch guards; their names reach no program today, because a row of /state/warden is a name and a value.

--tui takes the whole screen and keeps the rows live; q leaves.

EXAMPLE

$ warden --help
warden [--tui]
  what the kernel watch looked at, and what it found broken
  --tui  live on the whole screen, q leaves

SEE ALSO

mods, customs, top, state