From 641b76db1654717de9073e66f42b0bbeaa30bcb5 Mon Sep 17 00:00:00 2001 From: Adam Wujek <adam.wujek@cern.ch> Date: Fri, 26 Jun 2015 14:44:31 +0200 Subject: [PATCH] doc/wrs-user-manual: add information about monit Signed-off-by: Adam Wujek <adam.wujek@cern.ch> --- doc/wrs-developer-manual.in | 41 +++++++++++++++++++++++++++++++++++++ doc/wrs-user-manual.in | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/doc/wrs-developer-manual.in b/doc/wrs-developer-manual.in index bc2631714..1c723517d 100644 --- a/doc/wrs-developer-manual.in +++ b/doc/wrs-developer-manual.in @@ -1814,6 +1814,47 @@ gentle restarts before. Date set from file @t{/update/saved_date} is never correct, but is based on best effort principle. +@c ========================================================================== +@node Supervision of running processes +@section Supervision of running processes + +During normal operation @t{monit} supervises several processes running on a wrs +switch. Check is done every 10 seconds. As for now supervised processes are: +@t{wrsw_rtud}, +@t{wrsw_hal}, +@t{ppsi}, +@t{lighttpd}, +@t{dropbear}, +@t{snmpd}. + +In case any of the supervised processes does not run anymore (because of a crash, +exit etc.), @t{monit} restarts missing process. If 5 restarts of a process +occur during 10 cycles (10*10 seconds), the entire switch is restarted. + +Since @t{monit} is started from the inittab, even if @t{monit} crashes for some +reason it will be re-spawned by the @t{init}. + +@c ========================================================================== +@node Disabling monit +@subsection Disabling monit + +In some cases, especially during development it is convenient to disable +@t{monit} to avoid annoying re-spawns of the processes and restarts of the entire +switch. +@t{monit} can be disabled with command: +@example +/etc/init.d/monit.sh stop +@end example +which will send STOP signal to @t{monit} or by adding @t{CONFIG_MONIT_DISABLE=y} to dot-config. + +To re-enable @t{monit} first make sure there is no @t{CONFIG_MONIT_DISABLE=y} in dot-config, then execute command: +@example +/etc/init.d/monit.sh start +@end example + +NOTE: Even when @t{monit} is disabled there is a process @t{/usr/bin/monit} in +a process list, but its state is "stopped" (T). + @c ========================================================================== @node SDB and Hardware Information @section SDB and Hardware Information diff --git a/doc/wrs-user-manual.in b/doc/wrs-user-manual.in index 1c6ec2965..0080570c9 100644 --- a/doc/wrs-user-manual.in +++ b/doc/wrs-user-manual.in @@ -554,7 +554,7 @@ value is changed by the web interface, proper action is taken. @item CONFIG_MONIT_DISABLE Disable monitoring of running processes by monit. Monit by default - re spawns processes that have died. This option is useful mostly during + re-spawns processes that have died. This option is useful mostly during development. @end table -- GitLab