summary refs log tree commit diff
path: root/doc/svwaitup.8.html
blob: 65833a6476bf8cebd1f31cbdef17d028a4535a63 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72



<html>
<head>
<title>svwaitup(8) manual page</title>
</head>
<body bgcolor='white'>
<a href='http://smarden.org/pape/'>G. Pape</a><br><a href='index.html'>runit</A><hr><p>

<h2><a name='sect0'>Name</a></h2>
svwaitup - waits for services controlled by <i>runsv(8)</i> to be up 
<h2><a name='sect1'>Synopsis</a></h2>
<b>svwaitup</b>
[ <b>-v</b> ] [ <b>-s</b> <i>sec</i> ] <i>services</i> 
<h2><a name='sect2'>Description</a></h2>
<i>services</i> consists of one or more arguments,
each argument naming a service directory. <p>
<b>svwaitup</b> checks each <i>service</i> given
at the command line for being at least the specified number of seconds
<i>sec</i> up. The <i>services</i> given at the command line must be controlled by <i><b>runsv</b>(8)</i>.
<p>
<b>svwaitup</b> blocks until all <i>services</i> were up and running at least <i>sec</i> seconds
when <b>svwaitup</b> was checking or reports errors. 
<h2><a name='sect3'>Options</a></h2>

<dl>

<dt><b>-v</b> </dt>
<dd>verbose. Print verbose
messages to stderr. </dd>

<dt><b>-s <i>sec</b> </i></dt>
<dd>Set the minimum number of seconds each <i>service</i>
has to be up to <i>sec</i> seconds. <i>sec</i> must be between 1 and 600. Default is 2.
</dd>
</dl>

<h2><a name='sect4'>Exit Codes</a></h2>
<b>svwaitup</b> returns 0 as soon as all <i>services</i> were at least <i>sec</i>
seconds up. <p>
<b>Note</b>: If <b>svwaitup</b> exits 0, it does not guarantee that all <i>services</i>
are actually running. A <i>service</i> could have crashed immediatly after <b>svwaitup</b>
was successfully checking it to be up <i>sec</i> seconds. <i>services</i> should be designed
not to rely on <b>svwaitup</b> to resolve dependencies. <p>
For each <i>service</i> that is
down and not requested to become up, or that causes an error while checking
(e.g. <i><b>runsv</b>(8)</i> is not running), <b>svwaitup</b> increases the exit code by one and
exits non zero. The maximum is 100. <p>
<b>svwaitup</b> returns 111 on error. 
<h2><a name='sect5'>See Also</a></h2>
<i>sv(8)</i>,
<i>runsv(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>svwaitdown(8)</i> <p>
<i>http://smarden.org/runit/</i> 
<h2><a name='sect6'>Author</a></h2>
Gerrit Pape &lt;pape@smarden.org&gt;
<p>

<hr><p>
<a name='toc'><b>Table of Contents</b></a><p>
<ul>
<li><a name='toc0' href='#sect0'>Name</a></li>
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
<li><a name='toc2' href='#sect2'>Description</a></li>
<li><a name='toc3' href='#sect3'>Options</a></li>
<li><a name='toc4' href='#sect4'>Exit Codes</a></li>
<li><a name='toc5' href='#sect5'>See Also</a></li>
<li><a name='toc6' href='#sect6'>Author</a></li>
</ul>
</body>
</html>