diff options
author | Gerrit Pape <pape@smarden.org> | 2004-09-20 19:53:10 +0000 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2004-09-20 19:53:10 +0000 |
commit | 93b624bae85633d86da0f61bb7e96e1443f134aa (patch) | |
tree | 509da879d54c8cdd36a7f43edb18fc6e03844585 /doc | |
parent | ef14eafab5dd09c6706a372835b932015f1fe9a8 (diff) | |
download | runit-93b624bae85633d86da0f61bb7e96e1443f134aa.tar.gz runit-93b624bae85633d86da0f61bb7e96e1443f134aa.tar.xz runit-93b624bae85633d86da0f61bb7e96e1443f134aa.zip |
* svlogd.c: fix line buffer handling for pattern matching (thx Enrico
Scholz); minor bug fixes. * doc/index.html: wording; add link to useinit.html; remove link to runit on LinuxFromScratch. * doc/runscripts.html: add hint, some getties need to be run in a new session/process group (thx Dan Melomedman). * man/svlogd.8: minor fixes. * man/svwaitdown.8: remove hint about -x option.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/index.html | 16 | ||||
-rw-r--r-- | doc/runscripts.html | 5 | ||||
-rw-r--r-- | doc/svlogd.8.html | 118 | ||||
-rw-r--r-- | doc/svwaitdown.8.html | 28 |
4 files changed, 85 insertions, 82 deletions
diff --git a/doc/index.html b/doc/index.html index f91975f..a46612d 100644 --- a/doc/index.html +++ b/doc/index.html @@ -78,23 +78,23 @@ if this is started by the kernel. terminate. The system's one time initialization tasks are done here. <tt>/etc/runit/1</tt> has full control over <tt>/dev/console</tt> to be - able to start an emergency shell if the one time initialization tasks - fail. + able to start an emergency shell in case the one time initialization + tasks fail. <li><b>Stage 2:</b><br> <i>runit</i> starts <tt>/etc/runit/2</tt> which should not return until the system is going to halt or reboot; if it crashes, it will be restarted. Normally, <tt>/etc/runit/2</tt> runs <a href="runsvdir.8.html">runsvdir</a>. - In Stage 2 <i>runit</i> optionally handles an INT signal (ctrl-alt-del + In Stage 2 <i>runit</i> optionally handles the INT signal (ctrl-alt-del keyboard request on Linux/i386). <li><b>Stage 3:</b><br> - If <i>runit</i> is told to halt or reboot the system, or the Stage 2 - returns without errors, it terminates Stage 2 if it is running and runs + If <i>runit</i> is told to halt or reboot the system, or Stage 2 returns + without errors, it terminates Stage 2 if it is running, and runs <tt>/etc/runit/3</tt>. The systems tasks to shutdown and halt or reboot are done here. </ul> -These are working examples for Debian woody: +These are working examples for Debian sarge: <a href="debian/1">/etc/runit/1</a>, <a href="debian/2">/etc/runit/2</a>, <a href="debian/3">/etc/runit/3</a>. @@ -185,6 +185,8 @@ Of course also the <tt>smarden.org</tt> content server is running with See <a href="install.html">How to install runit</a> for installing <i>runit</i>, and <a href="replaceinit.html">How to replace init</a> for configuring <i>runit</i> to run as process no 1. +See <a href="useinit.html">How to use with current init</a> if you want to +use <i>runit</i> without replacing the current init scheme. <hr> If <i>runit</i> on Linux is compiled and linked with the <a href="http://www.fefe.de/dietlibc/">dietlibc</a>, it yields in a @@ -208,8 +210,6 @@ runit Debian package</a> runit-run Debian package</a> <li><a href="http://www.freshports.org/sysutils/runit/"> runit FreeBSD port</a> -<li><a href="http://www.109bean.org.uk/betterboot/index.html"> -runit on LinuxFromScratch</a> - by Richard A Downing FBCS <li><a href="http://rpmfind.net/linux/rpm2html/search.php?query=runit"> runit RPMs</a> <li><a href="http://www.fefe.de/minit/"> diff --git a/doc/runscripts.html b/doc/runscripts.html index 9ee0c40..e160550 100644 --- a/doc/runscripts.html +++ b/doc/runscripts.html @@ -339,6 +339,11 @@ Debian's <tt>mingetty</tt> creates its own utmp record. #!/bin/sh exec chpst -P fgetty tty4 </pre> +The <a href="runsv.8.html">runsv</a> program does not automatically create +a new session and separate process group for run scripts, which can +cause some <i>getties</i> to fail due to limited permissions. +The <a href="chpst.8.html">chpst</a> program can be used to alter the +process state for those <i>getties</i>. <hr> <h3><a name="gpm">A <tt>gpm</tt> run script</a></h3> (<i>LFS</i>) diff --git a/doc/svlogd.8.html b/doc/svlogd.8.html index 50147eb..427147d 100644 --- a/doc/svlogd.8.html +++ b/doc/svlogd.8.html @@ -12,7 +12,7 @@ svlogd - runit’s service logging daemon <h2><a name='sect1'>Synopsis</a></h2> <b>svlogd</b> [-ttv] [-r <i>c]</i> [-R -<i>xyz]</i> [-l <i>n]</i> [-b <i>n]</i> <i>logs</i> +<i>xyz]</i> [-l <i>len]</i> [-b <i>buflen]</i> <i>logs</i> <h2><a name='sect2'>Description</a></h2> <i>logs</i> consists of one or more arguments, each specifying a directory. <p> @@ -21,78 +21,78 @@ standard input, optionally filters log messages, and writes the data to one or more automatically rotated <i>logs</i>. <p> Recent log files can automatically be processed by an arbitrary processor program when they are rotated, and -<b>svlogd</b> can be told to alert selected log messages to standard error. <p> -<b>svlogd</b> -runs until it sees end-of-file on standard input or is sent a TERM signal, -see below. +<b>svlogd</b> can be told to alert selected log messages to standard error, and +through udp. <p> +<b>svlogd</b> runs until it sees end-of-file on standard input or is +sent a TERM signal, see below. <h3><a name='sect3'>Log Directory</a></h3> -A log directory <i>log</i> contains some number of old -log files, and the current log file <i>current</i>. Old log files have a file name -starting with <i>@</i> followed by a precise timestamp (see <i><b>tai64n</b>(8)</i>), indicating -when <i>current</i> was rotated and renamed to this file. <p> -A log directory additionally -contains the lock file <i>lock</i>, maybe <i>state</i> and <i>newstate</i>, and optionally the -file <i>config</i>. <b>svlogd</b> creates necessary files if they don’t exist. <p> -If <b>svlogd</b> -has trouble opening a log directory, it prints a warning, and ignores this -log directory. If <b>svlogd</b> is unable to open all log directories given at -the command line, it exits with an error. This can happen on start-up or -after receiving a HUP signal. +A log directory <i>log</i> contains +some number of old log files, and the current log file <i>current</i>. Old log +files have a file name starting with <i>@</i> followed by a precise timestamp +(see <i><b>tai64n</b>(8)</i>), indicating when <i>current</i> was rotated and renamed to this +file. <p> +A log directory additionally contains the lock file <i>lock</i>, maybe <i>state</i> +and <i>newstate</i>, and optionally the file <i>config</i>. <b>svlogd</b> creates necessary files +if they don’t exist. <p> +If <b>svlogd</b> has trouble opening a log directory, it prints +a warning, and ignores this log directory. If <b>svlogd</b> is unable to open all +log directories given at the command line, it exits with an error. This +can happen on start-up or after receiving a HUP signal. <h3><a name='sect4'>Log File Rotation</a></h3> -<b>svlogd</b> appends selected log -messages to the <i>current</i> log file. If <i>current</i> has <i>size</i> bytes or more size -(or there is a new-line within the last <i>len</i> of <i>size</i> bytes) <i>current</i> is rotated: -<p> -<b>svlogd</b> closes <i>current</i>, changes permission of <i>current</i> to 0755, renames <i>current</i> -to @<i>timestamp.s,</i> and starts with a new empty <i>current</i>. If <b>svlogd</b> sees <i>num</i> -or more old log files in <i>dir</i>, it removes the oldest. +<b>svlogd</b> +appends selected log messages to the <i>current</i> log file. If <i>current</i> has <i>size</i> +bytes or more (or there is a new-line within the last <i>len</i> of <i>size</i> bytes) +<i>current</i> is rotated: <p> +<b>svlogd</b> closes <i>current</i>, changes permission of <i>current</i> +to 0755, renames <i>current</i> to @<i>timestamp.s,</i> and starts with a new empty <i>current</i>. +If <b>svlogd</b> sees <i>num</i> or more old log files in <i>dir</i>, it removes the oldest +one. <h3><a name='sect5'>Processor</a></h3> -If <b>svlogd</b> -is told to process recent log files, it saves <i>current</i> to @<i>timestamp.u,</i> feeds -@<i>timestamp.u</i> through ‘‘sh -c "<i>processor</i>"’’ and writes the output to @<i>timestamp.t.</i> -If the <i>processor</i> finishes successfully, @<i>timestamp.u</i> is deleted and @<i>timestamp.t</i> -is renamed to @<i>timestamp.s,</i> otherwise @<i>timestamp.t</i> is deleted and the <i>processor</i> -is started again. <b>svlogd</b> also saves any output that the <i>processor</i> writes -to file descriptor 5, and make that output available on file descriptor -4 when it runs <i>processor</i> on the next log file rotation. <p> -A <i>processor</i> is run -in the background. If <b>svlogd</b> sees a previously started <i>processor</i> still running -when trying to start a new one for the same <i>log</i>, it blocks until the currently -running <i>processor</i> has finished successfully. Only the HUP signal works in -that situation. Note that this may block any program feeding its log data -to <b>svlogd.</b> +If <b>svlogd</b> is told to process recent log files, it saves <i>current</i> +to @<i>timestamp.u,</i> feeds @<i>timestamp.u</i> through ‘‘sh -c "<i>processor</i>"’’ and writes the +output to @<i>timestamp.t.</i> If the <i>processor</i> finishes successfully, @<i>timestamp.u</i> +is deleted and @<i>timestamp.t</i> is renamed to @<i>timestamp.s,</i> otherwise @<i>timestamp.t</i> +is deleted and the <i>processor</i> is started again. <b>svlogd</b> also saves any output +that the <i>processor</i> writes to file descriptor 5, and makes that output available +on file descriptor 4 when running <i>processor</i> on the next log file rotation. +<p> +A <i>processor</i> is run in the background. If <b>svlogd</b> sees a previously started +<i>processor</i> still running when trying to start a new one for the same <i>log</i>, +it blocks until the currently running <i>processor</i> has finished successfully. +Only the HUP signal works in that situation. Note that this may block any +program feeding its log data to <b>svlogd.</b> <p> <h3><a name='sect6'>Config</a></h3> -On startup, and after receiving a HUP signal, <b>svlogd</b> checks -for each <i>log</i> if the configuration file <i>log/config</i> exists, and if so, reads -the file line by line and adjusts configuration for <i>log</i> as follows: <p> -If -the line is empty, less than two characters long, or starts with a ‘‘#’’, it -is ignored. A line of the form +On startup, and after receiving +a HUP signal, <b>svlogd</b> checks for each <i>log</i> if the configuration file <i>log/config</i> +exists, and if so, reads the file line by line and adjusts configuration +for <i>log</i> as follows: <p> +If the line is empty, less than two characters long, +or starts with a ‘‘#’’, it is ignored. A line of the form <dl> <dt>s<i>size</i> </dt> -<dd>sets the maximum file size of <i>current</i> -when <b>svlogd</b> should rotate the current log file to <i>size</i> bytes. Default is -1000000. If <i>size</i> is zero, <b>svlogd</b> doesn’t rotate log files. You should set -<i>size</i> to at least (2 * <i>len</i>). </dd> +<dd>sets the maximum +file size of <i>current</i> when <b>svlogd</b> should rotate the current log file to +<i>size</i> bytes. Default is 1000000. If <i>size</i> is zero, <b>svlogd</b> doesn’t rotate log +files. You should set <i>size</i> to at least (2 * <i>len</i>). </dd> <dt>n<i>num</i> </dt> -<dd>sets the maximum number of old log files -<b>svlogd</b> should maintain to <i>num</i>. If <b>svlogd</b> sees more that <i>num</i> old log files -in <i>log</i> after log file rotation, it deletes the oldest one. Default is 10. -</dd> +<dd>sets the maximum number +of old log files <b>svlogd</b> should maintain to <i>num</i>. If <b>svlogd</b> sees more that +<i>num</i> old log files in <i>log</i> after log file rotation, it deletes the oldest +one. Default is 10. </dd> <dt>!<i>processor</i> </dt> -<dd>tells <b>svlogd</b> to feed each recent log file through <i>processor</i> -(see above) on log file rotation. By default log files are not processed. -</dd> +<dd>tells <b>svlogd</b> to feed each recent log file +through <i>processor</i> (see above) on log file rotation. By default log files +are not processed. </dd> <dt>u<i>a.b.c.d[:port]</i> </dt> -<dd>tells <b>svlogd</b> to transmit the first <i>len</i> characters of selected -log messages to the IP address <i>a.b.c.d</i>, port number <i>port</i>. If <i>port</i> isn’t set, -the default port for syslog is used (514). <i>len</i> can be set through the -l -option, see below. If <b>svlogd</b> has trouble sending udp packets, it writes +<dd>tells <b>svlogd</b> to transmit the first <i>len</i> characters +of selected log messages to the IP address <i>a.b.c.d</i>, port number <i>port</i>. If <i>port</i> +isn’t set, the default port for syslog is used (514). <i>len</i> can be set through +the -l option, see below. If <b>svlogd</b> has trouble sending udp packets, it writes error messages to the log directory. Attention: logging through udp is unreliable, and should be used in private networks only. </dd> diff --git a/doc/svwaitdown.8.html b/doc/svwaitdown.8.html index 052920f..cdbc500 100644 --- a/doc/svwaitdown.8.html +++ b/doc/svwaitdown.8.html @@ -43,25 +43,23 @@ signal. </dd> <dt><b>-x</b> </dt> <dd>Exit. Send each <i>service</i> the ‘‘exit’’ command additionally to the ‘‘down’’ command, and wait for the corresponding <i><b>runsv</b>(8)</i> processes to exit instead -for the <i>services</i> to be down. This option should only be used by <i><b>runit</b>(8)</i> -in stage 3 when <i><b>runsvdir</b>(8)</i> is already stopped. </dd> +for the <i>services</i> to be down. </dd> </dl> <h2><a name='sect4'>Exit Codes</a></h2> -<b>svwaitdown</b> returns -0 as soon as all <i>services</i> are down. <p> -If a <i>service</i> is usually controlled by -<i><b>runsv (8)</b></i> or <i><b>supervise</b>(8)</i>, but no supervisor process is currently running, -<b>svwaitdown</b> treats this <i>service</i> as if it would be down. <p> -For each <i>service</i> -that causes an error while checking, <b>svwaitdown</b> increases the exit code -by one and exits non zero. The maximum is 100. <p> -<b>svwaitdown</b> returns 111 if -the timeout <i>sec</i> was reached. +<b>svwaitdown</b> returns 0 as soon as all +<i>services</i> are down. <p> +If a <i>service</i> is usually controlled by <i><b>runsv (8)</b></i> or <i><b>supervise</b>(8)</i>, +but no supervisor process is currently running, <b>svwaitdown</b> treats this +<i>service</i> as if it would be down. <p> +For each <i>service</i> that causes an error while +checking, <b>svwaitdown</b> increases the exit code by one and exits non zero. +The maximum is 100. <p> +<b>svwaitdown</b> returns 111 if the timeout <i>sec</i> was reached. + <h2><a name='sect5'>See Also</a></h2> -<i>svwaitup(8)</i>, <i>runsv(8)</i>, <i>runsvctrl(8)</i>, -<i>runsvstat(8)</i>, <i>chpst(8)</i>, <i>svlogd(8)</i>, <i>runit(8)</i>, <i>runit-init(8)</i>, <i>runsvdir(8)</i>, -<i>runsvchdir(8)</i>, <i>utmpset(8)</i> <p> +<i>svwaitup(8)</i>, <i>runsv(8)</i>, <i>runsvctrl(8)</i>, <i>runsvstat(8)</i>, <i>chpst(8)</i>, <i>svlogd(8)</i>, +<i>runit(8)</i>, <i>runit-init(8)</i>, <i>runsvdir(8)</i>, <i>runsvchdir(8)</i>, <i>utmpset(8)</i> <p> <i>http://smarden.org/runit/</i><br> <i>http://cr.yp.to/daemontools.html</i><br> |