diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2018-03-21 18:00:10 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2018-03-21 18:00:10 +0000 |
commit | 75c4223a7f5a8a073ba0d898ef9d841fdaef2f63 (patch) | |
tree | d024c08659674117134314e67b4ff825ae51c1d9 /doc | |
parent | 91eba4b27017c3b7bf0d0bb548a12a694ed51a3b (diff) | |
download | s6-75c4223a7f5a8a073ba0d898ef9d841fdaef2f63.tar.xz |
Add s6-svdt-clear, s6-permafailon
Diffstat (limited to 'doc')
-rw-r--r-- | doc/index.html | 2 | ||||
-rw-r--r-- | doc/s6-permafailon.html | 98 | ||||
-rw-r--r-- | doc/s6-svdt-clear.html | 58 | ||||
-rw-r--r-- | doc/s6-svdt.html | 6 | ||||
-rw-r--r-- | doc/s6-svstat.html | 5 | ||||
-rw-r--r-- | doc/upgrade.html | 6 |
6 files changed, 170 insertions, 5 deletions
diff --git a/doc/index.html b/doc/index.html index 733e3ee..bae4da6 100644 --- a/doc/index.html +++ b/doc/index.html @@ -157,6 +157,8 @@ a user interface to control those processes and monitor service states. <li><a href="s6-svlisten.html">The <tt>s6-svlisten</tt> program</a></li> <li><a href="s6-notifyoncheck.html">The <tt>s6-notifyoncheck</tt> program</a></li> <li><a href="s6-svdt.html">The <tt>s6-svdt</tt> program</a></li> +<li><a href="s6-svdt-clear.html">The <tt>s6-svdt-clear</tt> program</a></li> +<li><a href="s6-permafailon.html">The <tt>s6-permafailon</tt> program</a></li> </ul> <h4> Daemontools-like utilities </h4> diff --git a/doc/s6-permafailon.html b/doc/s6-permafailon.html new file mode 100644 index 0000000..f749d5f --- /dev/null +++ b/doc/s6-permafailon.html @@ -0,0 +1,98 @@ +<html> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6: the s6-permafailon program</title> + <meta name="Description" content="s6: the s6-permafailon program" /> + <meta name="Keywords" content="s6 supervision finish permanent failure service" /> + <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6</a><br /> +<a href="//skarnet.org/software/">Software</a><br /> +<a href="//skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-permafailon</tt> program </h1> + +<p> +<tt>s6-permafailon</tt> is a program that is meant to be used +in the <tt>./finish</tt> script of a +<a href="servicedir.html">service directory</a> supervised by +<a href="s6-supervise.html">s6-supervise</a>. When used, it +reads and analyses the death tally of a service (i.e. the recent +process death events that happened), and if the death tally +matches a given pattern, it causes <em>permanent failure</em> +of the service, i.e. it tells the supervisor not to try and +restart it. +</p> + +<h2> Interface </h2> + +<pre> + s6-permafailon <em>secs</em> <em>deathcount</em> <em>events</em> <em>prog...</em> +</pre> + +<ul> + <li> <tt>s6-permafailon</tt> must have the service directory of the +tested service as its current directory. This is the default if it is +called from the <tt>finish</tt> script of the service. </li> + <li> It reads the <em>death tally</em> of the service, which is +maintained by <a href="s6-supervise.html">s6-supervise</a>. </li> + <li> If the supervised process has died at least <em>deathcount</em> +times in the last <em>secs</em> seconds with a cause listed in +<em>events</em>, then <tt>s6-permafailon</tt> exits 125. </li> + <li> Else <tt>s6-permafailon</tt> execs into <em>prog...</em>. </li> +</ul> + +<p> + <em>events</em> is a comma-separated list of events. An event can be +one of the following: +</p> + +<ul> + <li> An exit code, which is an integer between 0 and 255. Example: <tt>1</tt> </li> + <li> An exit code interval, which is two exit codes separated by a dash. Example: <tt>1-50</tt> </li> + <li> A signal name, or a signal number preceded by "SIG". Examples: <tt>SIGTERM</tt>, <tt>sigabrt</tt>, <tt>sig11</tt> </li> +</ul> + +<h2> Usage </h2> + +<ul> + <li> <a href="s6-supervise.html">s6-supervise</a> detects when the <tt>./finish</tt> +script of its service exits 125, and stops respawning the service. So, if the +<tt>./finish</tt> script is a chain-loading command line starting with a +<tt>s6-permafailon</tt> invocation (or containing such an invocation), when +<tt>s6-permafailon</tt> exits 125, then the <tt>./finish</tt> script also +exits 125 (because it is the same process), and the service is then marked as +failing permanently. </li> + <li> The <tt>./finish</tt> script is <em>naturally</em> a chain-loading +command line if it is written in the +<a href="//skarnet.org/software/execline/">execline</a> language. It +can also be made into a chain-loading command line from a shell script by using +<tt>exec s6-permafailon secs deathcount events rest-of-chainloading-cmdline...</tt> </li> + <li> Multiple invocations of <tt>s6-permafailon</tt> can be chained, in order +to test several death patterns. </li> + <li> If a permanent failure is triggered and <em>secs</em> is high, it is +possible that when the administrator manually launches the service again, +the next death triggers a permanent failure again. If this is not wanted, +the administrator should clear the death tally with the +<a href="s6-svdt-clear.html">s6-svdt-clear</a> command. </li> + <li> The current death tally can be viewed via the <a href="s6-svdt.html">s6-svdt</a> +command. </li> +</ul> + +<h2> Example </h2> + +<p> + <tt>s6-permafailon 60 5 1,101-103,SIGSEGV,SIBBUS <em>prog...</em></tt> +will exit 125 if the service has died 5 times in the last 60 seconds with +an exit code of 1, 101, 102 or 103, a SIGSEGV or a SIGBUS. Else it will +chainload into the <em>prog...</em> command line. +</p> + +</body> +</html> diff --git a/doc/s6-svdt-clear.html b/doc/s6-svdt-clear.html new file mode 100644 index 0000000..e69a1ae --- /dev/null +++ b/doc/s6-svdt-clear.html @@ -0,0 +1,58 @@ +<html> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6: the s6-svdt-clear program</title> + <meta name="Description" content="s6: the s6-svdt-clear program" /> + <meta name="Keywords" content="s6 command s6-svdt-clear servicedir death tally clearing process supervision s6-supervise" /> + <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6</a><br /> +<a href="//skarnet.org/software/">Software</a><br /> +<a href="//skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-svdt-clear</tt> program </h1> + +<p> +<tt>s6-svdt-clear</tt> clears the recorded death tally of a service. +</p> + +<h2> Interface </h2> + +<pre> + s6-svdt-clear <em>servicedir</em> +</pre> + +<p> + s6-svdt-clear clears the recorded death tally of the service being +currently supervised at the <em>servicedir</em> +<a href="servicedir.html">service directory</a>. +</p> + +<ul> + <li> 0: success </li> + <li> 100: wrong usage </li> + <li> 111: system call failed </li> +</ul> + +<h2> Notes </h2> + +<ul> + <li> Use of <tt>s6-svdt-clear</tt> impacts the listings obtained +by the <a href="s6-svdt.html">s6-svdt</a> command. </li> + <li> It also impacts the behaviour of the +<a href="s6-permafailon.html">s6-permafailon</a> command. This is +the main reason to use <tt>s6-svdt-clear</tt>: once a service has +failed permanently due to an excessive number of deaths in a given +time, it can be useful to erase that record of deaths before +starting the service again, in order to avoid permanently failing +again too fast. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-svdt.html b/doc/s6-svdt.html index a908d8c..f069536 100644 --- a/doc/s6-svdt.html +++ b/doc/s6-svdt.html @@ -16,10 +16,10 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The s6-svdt program </h1> +<h1> The <tt>s6-svdt</tt> program </h1> <p> -s6-svstat prints the recorded death tally of a service, i.e. a list of the times +<tt>s6-svdt</tt> prints the recorded death tally of a service, i.e. a list of the times the process died, with the cause of death. </p> @@ -30,7 +30,7 @@ the process died, with the cause of death. </pre> <p> - s6-svdt prints the contents of the recorded death tally of the service being + <tt>s6-svdt</tt> prints the contents of the recorded death tally of the service being currently supervised at the <em>servicedir</em> <a href="servicedir.html">service directory</a>, then exits 0. </p> diff --git a/doc/s6-svstat.html b/doc/s6-svstat.html index a77f903..d40ec3b 100644 --- a/doc/s6-svstat.html +++ b/doc/s6-svstat.html @@ -76,8 +76,11 @@ are as follows. names are the following: <ul> <li> <tt>up</tt>: print <tt>true</tt> if the service is up and <tt>false</tt> if it is down. +<!-- If the service is being throttled (i.e. technically up, but sleeping for a certain -amount of time before it is really launched), it prints <tt>throttled</tt> instead of <tt>true</tt>. </li> +amount of time before it is really launched), it prints <tt>throttled</tt> instead of <tt>true</tt>. +--> + </li> <li> <tt>wantedup</tt>: print <tt>true</tt> if <a href="s6-supervise.html">s6-supervise</a> is currently instructed to (re)start the service when it is down, and <tt>false</tt> if <a href="s6-supervise.html">s6-supervise</a> is currently instructed to leave the service alone. </li> diff --git a/doc/upgrade.html b/doc/upgrade.html index 10f139b..c57156d 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -22,7 +22,11 @@ <ul> <li> skalibs dependency bumped to 2.6.4.0. </li> - <li> New command: <a href="s6-svdt.html">s6-svdt</a>. </li> + <li> New commands: <a href="s6-svdt.html">s6-svdt</a>, +<a href="s6-svdt-clear.html">s6-svdt-clear</a>, +<a href="s6-permafailon.html">s6-permafailon</a> </li> + <li> <a href="s6-tai64nlocal.html">s6-tai64nlocal</a> can now +print GMT times with the <tt>-g</tt> option. </li> </ul> <h2> in 2.7.0.0 </h2> |