runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

runsvdir.8 (2054B)


      1 .TH runsvdir 8
      2 .SH NAME
      3 runsvdir \- starts and monitors a collection of runsv(8) processes
      4 .SH SYNOPSIS
      5 .B runsvdir
      6 [\-P]
      7 .I dir
      8 [
      9 .I log
     10 ]
     11 .SH DESCRIPTION
     12 .I dir
     13 must be a directory.
     14 .I log
     15 is a space holder for a readproctitle log, and must be at least seven
     16 characters long or absent.
     17 .P
     18 .B runsvdir
     19 starts a
     20 .BR runsv (8)
     21 process for each subdirectory, or symlink to a directory, in the services
     22 directory
     23 .IR dir ,
     24 up to a limit of 1000 subdirectories,
     25 and restarts a
     26 .BR runsv (8)
     27 process if it terminates.
     28 .B runsvdir
     29 skips subdirectory names starting with dots.
     30 .BR runsv (8)
     31 must be in
     32 .BR runsvdir 's
     33 PATH.
     34 .P
     35 At least every five seconds
     36 .B runsvdir
     37 checks whether the time of last modification, the inode, or the device, of
     38 the services directory
     39 .I dir
     40 has changed.
     41 If so, it re-scans the service directory, and if it sees a new subdirectory,
     42 or new symlink to a directory, in
     43 .IR dir ,
     44 it starts a new
     45 .BR runsv (8)
     46 process;
     47 if
     48 .B runsvdir
     49 sees a subdirectory being removed that was previously there, it sends the
     50 corresponding
     51 .BR runsv (8)
     52 process a TERM signal, stops monitoring this process, and so does not
     53 restart the
     54 .BR runsv (8)
     55 process if it exits.
     56 .P
     57 If the
     58 .I log
     59 argument is given to
     60 .BR runsvdir ,
     61 all output to standard error is redirected to this
     62 .IR log ,
     63 which is similar to the daemontools'
     64 .B readproctitle
     65 log.
     66 To see the most recent error messages, use a process-listing tool such as
     67 .BR ps (1).
     68 .B runsvdir
     69 writes a dot to the readproctitle log every 15 minutes so that old error
     70 messages expire.
     71 .SH OPTIONS
     72 .TP
     73 .B \-P
     74 use
     75 .BR setsid (2)
     76 to run each
     77 .BR runsv (8)
     78 process in a new session and separate process group.
     79 .SH SIGNALS
     80 If
     81 .B runsvdir
     82 receives a TERM signal, it exits with 0 immediately.
     83 .P
     84 If
     85 .B runsvdir
     86 receives a HUP signal, it sends a TERM signal to each
     87 .BR runsv (8)
     88 process it is monitoring and then exits with 111.
     89 .SH SEE ALSO
     90 sv(8),
     91 runsv(8),
     92 runsvchdir(8),
     93 runit(8),
     94 runit-init(8),
     95 chpst(8),
     96 svlogd(8),
     97 utmpset(8),
     98 setsid(2)
     99 .P
    100 http://smarden.org/runit/
    101 .SH AUTHOR
    102 Gerrit Pape <pape@smarden.org>