PROPHET/OS

NAME

vigils: what is configured, how it is doing, and on which runlevel the machine stands

SYNOPSIS

vigils [--tui]

DESCRIPTION

What is configured, how it is doing, and on which runlevel the machine stands. One row per vigil, the level above the table.

vigils           every configured vigil with its state
vigils --tui     the same table live on the whole screen

Name is the program the vigil runs, for that is its name; a line that carries program:tag is the same program a second time with other arguments. State is what the starter has made of it. Running and waiting are green, failed is red, maintenance is yellow: that one has failed so long that the starter stopped throwing it, and vigil start throws it again.

Level says both facts of one decision: 3 is the level it belongs to and it runs again at the next start, off (3) keeps that level and does not. vigil enable and vigil disable move it.

User and Group stay empty for whoever is not in admin: the starter sends those two only to them, and the column stands there so the row keeps its shape.

Prio is what the vigil is worth on the CPU: idle, low, norm, high or a dash for the one every run starts with.

Asked is the starter over its channel, not the kernel: the kernel knows no vigils. The level comes from the kernel, because that is its own state and the starter only follows it.

The configuration is /system/config/vigils.yaml, one entry under vigils: per vigil, and init reads the same file at startup. A line carries six columns before its arguments: level, kind, user, **needs**, **prio** and program.

Needs is a condition the starter can check without a right of its own, file:<path> or - for none, and a condition that does not hold is no failure: nothing is thrown, nothing is counted, and the next round looks again (R12-INIT-03).

Prio is a word and not a number, because the numbers behind the words are the kernel's. The starter names it over POS_PROC_BESIDE_PRIO right after the throw, and high needs CAP_PRIO.

**The order of the lines is the order of the start**: whatever is due is handed to the thrower in the order it stands in the file, so what matters more belongs further up. There is no rank column and no graph.

A vigil that fails is thrown again with a doubling pause, and the attempt that would need longer than a quarter of an hour is not made: it goes to maintenance and waits for a hand (R12-INIT-04).

It carries two commands that are gone or changed: runlevel, which showed the level and nothing else, and the showing of vigil. runlevel <n> also set the level, and that is not missing: it set the number without telling the starter, so the vigils of that level stayed as they were. init <level> does both.

runs.

EXAMPLE

$ vigils
runlevel 3
Name                Level Kind      State       Runs  User  Group Prio  Program
say                     3 once      done           1   999    999 -     say apply
theme                   3 once      done           1   999    999 -     theme apply
loggerv                 3 always    running        1   999     10 -     loggerv
cronv                   3 always    running        1   999     10 low   cronv
dhcpcv                  3 always    running        1   999     20 -     dhcpcv
ntpv                    3 always    running        1   999     20 low   ntpv
wireguardv        off (3) always    off            0   999     20 -     wireguardv
httpv             off (3) always    off            0   999     40 -     httpv
copyv             off (3) always    off            0   999     20 -     copyv serve
pos_fileround     off (3) once      off            0   999    999 -     pos_fileround
pos_ptyround      off (3) once      off            0   999    999 -     pos_ptyround
bl_tlsround       off (3) once      off            0   999    999 -     bl_tlsround
mqttv             off (3) always    off            0   999     20 idle  mqttv
soundv            off (3) always    off            0   999    999 -     soundv

SEE ALSO

vigil` (which acts on one of them), init, log, loggerv