diff options
author | Gerrit Pape <pape@smarden.org> | 2002-09-25 10:17:58 +0000 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2002-09-25 10:17:58 +0000 |
commit | b832b6d7c3800714d328e955eb13f975b389693e (patch) | |
tree | 92b6ef6691693e64c96b4c50bc2a92aa7d6bff0e /man | |
parent | 3467ac501986b1afb28e69352c4368637aba67d6 (diff) | |
download | runit-b832b6d7c3800714d328e955eb13f975b389693e.tar.gz runit-b832b6d7c3800714d328e955eb13f975b389693e.tar.xz runit-b832b6d7c3800714d328e955eb13f975b389693e.zip |
new.
Diffstat (limited to 'man')
-rw-r--r-- | man/runsv.8 | 149 | ||||
-rw-r--r-- | man/runsvdir.8 | 83 |
2 files changed, 232 insertions, 0 deletions
diff --git a/man/runsv.8 b/man/runsv.8 new file mode 100644 index 0000000..ddfd5ea --- /dev/null +++ b/man/runsv.8 @@ -0,0 +1,149 @@ +.TH runsv 8 +.SH NAME +runsv \- starts and monitors a service and optionally an appendant log +service +.SH SYNOPSIS +.B runsv +.I service +.SH DESCRIPTION +.I service +must be a directory. +.P +.B runsv +switches to the directory +.I service +and starts ./run. if ./run exits and ./finish exists, +.B runsv +starts ./finish. If ./finish doesn't exist or ./finish exits, +.B runsv +restarts ./run. +.P +If ./run or ./finish exit immediatly, +.B runsv +waits a second before starting ./finish or restarting ./run. +.P +If the file +.IR service /down +exists, +.B runsv +does not start ./run immediately. The control interface (see below) can be +used to start the service and to give other commands to +.BR runsv . +.P +If the directory +.IR service /log +exists, +.B runsv +creates a pipe, redirects +.IR service /run's +and +.IR service /finish's +standard output to the pipe, switches to the directory +.IR service /log +and starts ./run (and ./finish) exactly as described above for the +.I service +directory. The standard input of the log service a redirected to read from +the pipe. +.P +.B runsv +maintains status information in a binary format compatible to +.BR supervise (8) +in +.IR service /supervise/status +( and +.IR service /log/supervise/status), +and in a human readable format in +.IR service /supervise/stat +( and +.IR service /log/supervise/stat). +.SH CONTROL +The named pipe +.IR service /supervise/control +(and +.IR service /log/supervise/control) +is provided to give commands to +.BR runsv . +You can use +.BR svc (8) +to control the service or just write one of the following characters to +the named pipe: +.TP +.B u +Up. If the service is not running, start it. If the service stops, restart +it. +.TP +.B d +Down. If the service is running, send it a TERM signal. If ./run exits, +start ./finish if it exists. After it stops, do not restart service. +.TP +.B o +Once. If the service is not running, start it. Do not restart it if it +stops. +.TP +.B p +Pause. If the service is running, send it a STOP signal. +.TP +.B c +Continue. If the service is running, send it a CONT signal. +.TP +.B h +Hangup. If the service is running, send it a HUP signal. +.TP +.B a +Alarm. If the service is running, send it a ALRM signal. +.TP +.B i +Interrupt. If the service is running, send it a INT signal. +.TP +.B 1 +User-defined 1. If the service is running, send it a USR1 signal. +.TP +.B 2 +User-defined 2. If the service is running, send it a USR2 signal. +.TP +.B t +Terminate. If the service is running, send it a TERM signal. +.TP +.B k +Kill. If the service is running, send it a KILL signal. +.TP +.B x \fRor \fBe +Exit. +If the service is running, send it a TERM signal. Do not restart the +service. If the service is down, and no log service exists, +.B runsv +exits. If the service is down and a log service exists, send a TERM signal +to the log service. If the log service is down, +.B runsv +exits. This command is ignored if it is given to +.IR service /log/supervise/control. +.P +For example, to send a TERM signal to /service/socklog-unix, either do + # svc -t /service/socklog-unix + or + # echo -n t >/service/socklog-unix/supervise/control +.SH SIGNALS +If +.B runsv +receives a TERM signal, it acts as if the character x was written to the +control pipe. +.SH EXIT CODES +.B runsv +exits 111 on an error on startup or if another +.B runsv +is running in +.IR service . +.P +.B runsv +exits 0 if it was told to exit. +.SH SEE ALSO +runit(8), +runit-init(8), +runsvdir(8), +svc(8), +supervise(8) +.P + http://smarden.org/runit/ + http://cr.yp.to/daemontools.html +.SH AUTHOR +Gerrit Pape <pape@smarden.org> diff --git a/man/runsvdir.8 b/man/runsvdir.8 new file mode 100644 index 0000000..7bea8fa --- /dev/null +++ b/man/runsvdir.8 @@ -0,0 +1,83 @@ +.TH runsvdir 8 +.SH NAME +runsvdir \- starts and monitors a collection of runsv(8) processes +.SH SYNOPSIS +.B runsvdir +.I dir +[ +.I log +] +.SH DESCRIPTION +.I dir +must be a directory. +.I log +is a space holder for a readproctitle log and must be at least seven +characters long. +.P +.B runsvdir +starts a +.BR runsv (8) +process for each subdirectory in +.IR dir , +up to a limit of 1000 subdirectories. +.B runsvdir +skips subdirectory names starting with dots. +.BR runsv (8) +must be in +.BR runsvdir 's +PATH. +.P +At least every five seconds, +.B runsvdir +checks if +.I dir +has changed. If it sees a new subdirectory in +.IR dir , +it starts a new +.BR runsv (8) +process. If it sees an old sudirectory where a +.BR runsv (8) +process has exited, it restarts the +.BR runsv (8) +process. +If +.B runsvdir +sees a subdirectory being removed that was previously there, it sends +the corresponding +.BR runsv (8) +process a TERM signal, stops monitoring this process, and so does not +restart the +.BR runsv (8) +process if it exits. +.P +If the +.I log +argument is given to +.BR runsvdir , +all output to standard error is redirected to this +.IR log , +which is similar to the +.BR readproctitle (8) +log. To see the most recent error messages, use a process-listing tool +such as +.BR ps (1). +.B runsvdir +writes a dot to the readproctitle log every 15 minutes so that old +error messages expire. +.P +Normally +.B runsvdir +is started by +.BR runit (8) +in stage 2. +.SH SEE ALSO +runit(8), +runit-init(8), +runsv(8), +readproctitle(8), +svscan(8) +.P + http://smarden.org/runit/ + http://cr.yp.to/daemontools.html +.SH AUTHOR +Gerrit Pape <pape@smarden.org> |