]> git.proxmox.com Git - mirror_lxc.git/blob - doc/lxc-stop.sgml.in
lxc-stop: don't set timeout if user requested -s
[mirror_lxc.git] / doc / lxc-stop.sgml.in
1 <!--
2
3 lxc: linux Container library
4
5 (C) Copyright IBM Corp. 2007, 2008
6
7 Authors:
8 Daniel Lezcano <daniel.lezcano at free.fr>
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
14
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
24 -->
25
26 <!DOCTYPE refentry PUBLIC @docdtd@ [
27
28 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
29 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
30 ]>
31
32 <refentry>
33
34 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
35
36 <refmeta>
37 <refentrytitle>lxc-stop</refentrytitle>
38 <manvolnum>1</manvolnum>
39 </refmeta>
40
41 <refnamediv>
42 <refname>lxc-stop</refname>
43
44 <refpurpose>
45 stop the application running inside a container
46 </refpurpose>
47 </refnamediv>
48
49 <refsynopsisdiv>
50 <cmdsynopsis>
51 <command>lxc-stop</command>
52 <arg choice="req">-n <replaceable>name</replaceable></arg>
53 <arg choice="opt">-W</arg>
54 <arg choice="opt">-r</arg>
55 <arg choice="opt">-t <replaceable>timeout</replaceable></arg>
56 <arg choice="opt">-k</arg>
57 <arg choice="opt">-s</arg>
58 </cmdsynopsis>
59 </refsynopsisdiv>
60
61 <refsect1>
62 <title>Description</title>
63
64 <para>
65 <command>lxc-stop</command> reboots, cleanly shuts down, or kills
66 all the processes inside the container. By default, it will
67 request a clean shutdown of the container (by sending SIGPWR to
68 the container), wait 60 seconds for the container to exit, and
69 returns. If the container fails to cleanly exit, then after 60
70 seconds the container will be sent the
71 <command>lxc.stopsignal</command> to force it to shut down.
72 </para>
73 <para>
74 The <optional>-W</optional>, <optional>-r</optional>, <optional>-s</optional>
75 and <optional>-k</optional> options specify the action to perform.
76 <optional>-W</optional> indicates that after performing the specified
77 action, <command>lxc-stop</command> should immediately exit, while
78 <optional>-t TIMEOUT</optional> specifies the maximum amount of time
79 to wait for the container to complete the shutdown or reboot.
80 </para>
81 </refsect1>
82
83 <refsect1>
84 <title>Options</title>
85 <variablelist>
86
87 <varlistentry>
88 <term>
89 <option>-r,--reboot </option>
90 </term>
91 <listitem>
92 <para>
93 Request a reboot of the container.
94 </para>
95 </listitem>
96 </varlistentry>
97
98 <varlistentry>
99 <term>
100 <option>-s,--shutdown </option>
101 </term>
102 <listitem>
103 <para>
104 Only request a clean shutdown, do not kill the container tasks if the
105 clean shutdown fails.
106 </para>
107 </listitem>
108 </varlistentry>
109
110 <varlistentry>
111 <term>
112 <option>-k,--kill </option>
113 </term>
114 <listitem>
115 <para>
116 Rather than requesting a clean shutdown of the container, explicitly
117 kill all tasks in the container. This is the legacy
118 <command>lxc-stop</command> behavior.
119 </para>
120 </listitem>
121 </varlistentry>
122
123 <varlistentry>
124 <term>
125 <option>--nolock </option>
126 </term>
127 <listitem>
128 <para>
129 This option avoids the use of any of the API lxc locking, and should
130 only be used if <command>lxc-stop</command> is hanging due to a bad
131 system state.
132 </para>
133 </listitem>
134 </varlistentry>
135
136 <varlistentry>
137 <term>
138 <option>-W,--nowait </option>
139 </term>
140 <listitem>
141 <para>
142 Simply perform the requestion action (reboot, shutdown, or hard
143 kill) and exit.
144 </para>
145 </listitem>
146 </varlistentry>
147
148 <varlistentry>
149 <term>
150 <option>-t,--timeout <replaceable>TIMEOUT</replaceable></option>
151 </term>
152 <listitem>
153 <para>
154 Wait TIMEOUT seconds before hard-stopping the container.
155 </para>
156 </listitem>
157 </varlistentry>
158
159 </variablelist>
160 </refsect1>
161
162 <refsect1>
163 <title>Diagnostic</title>
164
165 <variablelist>
166
167 <varlistentry>
168 <term>The container was not found</term>
169 <listitem>
170 <para>
171 The specified container was not created before with
172 the <command>lxc-create</command> command.
173 </para>
174 </listitem>
175 </varlistentry>
176
177 </variablelist>
178
179 </refsect1>
180
181 &seealso;
182
183 <refsect1>
184 <title>Author</title>
185 <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
186 </refsect1>
187
188 </refentry>
189
190 <!-- Keep this comment at the end of the file
191 Local variables:
192 mode: sgml
193 sgml-omittag:t
194 sgml-shorttag:t
195 sgml-minimize-attributes:nil
196 sgml-always-quote-attributes:t
197 sgml-indent-step:2
198 sgml-indent-data:t
199 sgml-parent-document:nil
200 sgml-default-dtd-file:nil
201 sgml-exposed-tags:nil
202 sgml-local-catalogs:nil
203 sgml-local-ecat-files:nil
204 End:
205 -->