]> git.proxmox.com Git - mirror_lxc.git/blob - doc/lxc-stop.sgml.in
add lxc.haltsignal for soft shutdown
[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">--nokill</arg>
58 <arg choice="opt">--nolock</arg>
59 </cmdsynopsis>
60 </refsynopsisdiv>
61
62 <refsect1>
63 <title>Description</title>
64
65 <para>
66 <command>lxc-stop</command> reboots, cleanly shuts down, or kills
67 all the processes inside the container. By default, it will
68 request a clean shutdown of the container by sending
69 <command>lxc.haltsignal</command> (defaults to SIGPWR) to
70 the container's init process, waiting up to 60 seconds for the container
71 to exit, and then returning. If the container fails to cleanly exit in
72 60 seconds, it will be sent the <command>lxc.stopsignal</command>
73 (defaults to SIGKILL) to force it to shut down.
74 </para>
75 <para>
76 The <optional>-W</optional>, <optional>-r</optional>,
77 <optional>-k</optional> and <optional>--nokill</optional>
78 options specify the action to perform.
79 <optional>-W</optional> indicates that after performing the specified
80 action, <command>lxc-stop</command> should immediately exit, while
81 <optional>-t TIMEOUT</optional> specifies the maximum amount of time
82 to wait for the container to complete the shutdown or reboot.
83 </para>
84 </refsect1>
85
86 <refsect1>
87 <title>Options</title>
88 <variablelist>
89
90 <varlistentry>
91 <term>
92 <option>-r,--reboot </option>
93 </term>
94 <listitem>
95 <para>
96 Request a reboot of the container.
97 </para>
98 </listitem>
99 </varlistentry>
100
101 <varlistentry>
102 <term>
103 <option>-k,--kill </option>
104 </term>
105 <listitem>
106 <para>
107 Rather than requesting a clean shutdown of the container, explicitly
108 kill all tasks in the container. This is the legacy
109 <command>lxc-stop</command> behavior.
110 </para>
111 </listitem>
112 </varlistentry>
113
114 <varlistentry>
115 <term>
116 <option>--nokill</option>
117 </term>
118 <listitem>
119 <para>
120 Only request a clean shutdown, do not kill the container tasks if the
121 clean shutdown fails.
122 </para>
123 </listitem>
124 </varlistentry>
125
126 <varlistentry>
127 <term>
128 <option>--nolock </option>
129 </term>
130 <listitem>
131 <para>
132 This option avoids the use of any of the API lxc locking, and should
133 only be used if <command>lxc-stop</command> is hanging due to a bad
134 system state.
135 </para>
136 </listitem>
137 </varlistentry>
138
139 <varlistentry>
140 <term>
141 <option>-W,--nowait </option>
142 </term>
143 <listitem>
144 <para>
145 Simply perform the requestion action (reboot, shutdown, or hard
146 kill) and exit.
147 </para>
148 </listitem>
149 </varlistentry>
150
151 <varlistentry>
152 <term>
153 <option>-t,--timeout <replaceable>TIMEOUT</replaceable></option>
154 </term>
155 <listitem>
156 <para>
157 Wait TIMEOUT seconds before hard-stopping the container.
158 </para>
159 </listitem>
160 </varlistentry>
161
162 </variablelist>
163 </refsect1>
164
165 <refsect1>
166 <title>Diagnostic</title>
167
168 <variablelist>
169
170 <varlistentry>
171 <term>The container was not found</term>
172 <listitem>
173 <para>
174 The specified container was not created before with
175 the <command>lxc-create</command> command.
176 </para>
177 </listitem>
178 </varlistentry>
179
180 </variablelist>
181
182 </refsect1>
183
184 &seealso;
185
186 <refsect1>
187 <title>Author</title>
188 <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
189 </refsect1>
190
191 </refentry>
192
193 <!-- Keep this comment at the end of the file
194 Local variables:
195 mode: sgml
196 sgml-omittag:t
197 sgml-shorttag:t
198 sgml-minimize-attributes:nil
199 sgml-always-quote-attributes:t
200 sgml-indent-step:2
201 sgml-indent-data:t
202 sgml-parent-document:nil
203 sgml-default-dtd-file:nil
204 sgml-exposed-tags:nil
205 sgml-local-catalogs:nil
206 sgml-local-ecat-files:nil
207 End:
208 -->