fiss

Friedel's Initialization and Service Supervision
Log | Files | Refs | LICENSE

commit 761eaf1a6091aa55c65c5f4c108aaf8f0285dea0
parent d93a3cf4ee5d7936b814b656e1b4b8a73aba2ae9
Author: Friedel Schön <[email protected]>
Date:   Wed, 17 May 2023 14:09:33 +0200

prettify docs

Diffstat:
Mdocs/internal/command.txt | 39+++++++++++++++++++++++++++++++--------
Ddocs/internal/runit-control.txt | 15---------------
Mdocs/internal/serialize.txt | 10+++++++---
Ddocs/internal/service-dir.txt | 30------------------------------
4 files changed, 38 insertions(+), 56 deletions(-)

diff --git a/docs/internal/command.txt b/docs/internal/command.txt @@ -1,3 +1,6 @@ +FISS COMMANDS +============= + start (u) [0] <service>: start if not running start (u) [1] <service>: start if not running and pin as up start (u) [2] <service>: only pin as restart @@ -5,11 +8,30 @@ stop (d) [0] <service>: stop if running stop (d) [1] <service>: stop if running and pin as down stop (d) [2] <service>: only pin as down send (k) [s] <service>: send signal $s to service -pause (p) [*] <service>: pause service (send SIGSTOP) -resume (c) [*] <service>: unpause service (send SIGCONT) -revive (v) [*] <service>: revive died service -update (g) [*] <service>: force update info // todo -exit (x) [*]: stop all services and kill the fsvs instance -refresh (y) [*]: refresh the service directory -status (a) [*] <service>: get status of the service -status (a) [*]: get status of all services +pause (p) [-] <service>: pause service (send SIGSTOP) +resume (c) [-] <service>: unpause service (send SIGCONT) +revive (v) [-] <service>: revive died service +update (g) [-] <service>: force update info // todo +exit (x) [-]: stop all services and kill the fsvs instance +refresh (y) [-]: refresh the service directory +status (a) [-] <service>: get status of the service +status (a) [-]: get status of all services + + +RUNIT COMMANDS +============== + +down (d): stopts the service and pin as stopped +up (u): starts the services and pin as started +exit (x): does nothing (actually exits the runsv instance) +once (o): starts the service but don't pin as started +term (t): same as down +kill (k): sends kill +pause (p): pauses the service +cont (c): resumes the service +alarm (a): sends alarm +hup (h): sends hup +int (i): sends interrupt +quit (q): sends quit +usr1 (1): sends usr1 +usr2 (2): sends usr2 +\ No newline at end of file diff --git a/docs/internal/runit-control.txt b/docs/internal/runit-control.txt @@ -1,14 +0,0 @@ -d = down -u = up -x = exit -t = sig term -k = sig kill -p = sig pause -c = sig cont -o = once -a = sig alarm -h = sig hup -i = sig int -q = sig quit -1 = sig usr1 -2 = sig usr2 -\ No newline at end of file diff --git a/docs/internal/serialize.txt b/docs/internal/serialize.txt @@ -1,9 +1,10 @@ FISS CONTROL RESPONSE ===================== -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -| PID | STATUS CHANGE |FC|RC|FLAGS| -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ ++--+-/ /-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +| NAME0 | PID | STATUS CHANGE |FC|RC|FLAGS| ++--+-/ /-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ +NAME0 = name of services | null-terminated PID = pid of the current instance (dependening on state) | big endian STATUS CHANGE = unix timestamp of last update (why tai tho?) | big endian FC = fail count @@ -38,3 +39,5 @@ PS = is paused (int boolean) WU = wants up ('u' if want up, 'd' if want down) TR = was terminated (int boolean) ST = state (0 is down, 1 is running, 2 is finishing) + +yuup, there are no flags, boolean-flags still use the whole byte (and WU even uses 'u'/'d') +\ No newline at end of file diff --git a/docs/internal/service-dir.txt b/docs/internal/service-dir.txt @@ -1,29 +0,0 @@ -# SERVICE DIRECTORY - -- <service>/ - - run -- runscript - - (enable) -- empty file (indicating it should start on boot or whenever fissd is started) - - fiss/ - - status -- status file - - control -- service control (fifo) - -# STATUS file - -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ -| PID | STATUS CHANGE |FC|FL| -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ - -pid -> pid of service process (0 if not active) -status change -> last time status changes (running/stopped/failed) -fc (fail count) -> count of instant fails (stopping in less than 5sec) -fl (flags) -> flags - -flags: -+--+--+--+--+--+--+--+--+ -|WU|SP|DE|PA| /// | -+--+--+--+--+--+--+--+--+ - -wu (wants up) -> will be restarted -sp (stopped) -> manually stopped (overrides $wu) -de (dead) -> failed too much (overrides $sp) -pa (paused) -> paused -\ No newline at end of file