]>
Commit | Line | Data |
---|---|---|
f79d43bb | 1 | <!-- |
d823d5b9 | 2 | |
3 | lxc: linux Container library | |
4 | ||
5 | (C) Copyright IBM Corp. 2007, 2008 | |
6 | ||
7 | Authors: | |
9afe19d6 | 8 | Daniel Lezcano <daniel.lezcano at free.fr> |
d823d5b9 | 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 | |
250b1eec | 22 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
d823d5b9 | 23 | |
24 | --> | |
25 | ||
7f951458 | 26 | <!DOCTYPE refentry PUBLIC @docdtd@ [ |
99e4008c | 27 | |
10fba81b | 28 | <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml"> |
99e4008c MN |
29 | <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml"> |
30 | ]> | |
d823d5b9 | 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> | |
b4578c5b DE |
51 | <command>lxc-stop</command> |
52 | <arg choice="req">-n <replaceable>name</replaceable></arg> | |
3e625e2d SH |
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> | |
84fbfcb4 DE |
57 | <arg choice="opt">--nokill</arg> |
58 | <arg choice="opt">--nolock</arg> | |
d823d5b9 | 59 | </cmdsynopsis> |
60 | </refsynopsisdiv> | |
61 | ||
62 | <refsect1> | |
63 | <title>Description</title> | |
64 | ||
65 | <para> | |
3e625e2d SH |
66 | <command>lxc-stop</command> reboots, cleanly shuts down, or kills |
67 | all the processes inside the container. By default, it will | |
f0f1d8c0 DE |
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. | |
d823d5b9 | 74 | </para> |
3e625e2d | 75 | <para> |
84fbfcb4 DE |
76 | The <optional>-W</optional>, <optional>-r</optional>, |
77 | <optional>-k</optional> and <optional>--nokill</optional> | |
78 | options specify the action to perform. | |
3e625e2d SH |
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> | |
d823d5b9 | 84 | </refsect1> |
85 | ||
3e625e2d SH |
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> | |
84fbfcb4 | 103 | <option>-k,--kill </option> |
3e625e2d SH |
104 | </term> |
105 | <listitem> | |
106 | <para> | |
84fbfcb4 DE |
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. | |
3e625e2d SH |
110 | </para> |
111 | </listitem> | |
112 | </varlistentry> | |
113 | ||
114 | <varlistentry> | |
115 | <term> | |
84fbfcb4 | 116 | <option>--nokill</option> |
3e625e2d SH |
117 | </term> |
118 | <listitem> | |
119 | <para> | |
84fbfcb4 DE |
120 | Only request a clean shutdown, do not kill the container tasks if the |
121 | clean shutdown fails. | |
3e625e2d SH |
122 | </para> |
123 | </listitem> | |
124 | </varlistentry> | |
125 | ||
8face1de SH |
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 | ||
3e625e2d SH |
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> | |
25070b66 | 157 | Wait TIMEOUT seconds before hard-stopping the container. |
3e625e2d SH |
158 | </para> |
159 | </listitem> | |
160 | </varlistentry> | |
161 | ||
162 | </variablelist> | |
163 | </refsect1> | |
d823d5b9 | 164 | |
165 | <refsect1> | |
166 | <title>Diagnostic</title> | |
167 | ||
168 | <variablelist> | |
169 | ||
d823d5b9 | 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> | |
f79d43bb | 178 | </varlistentry> |
d823d5b9 | 179 | |
d823d5b9 | 180 | </variablelist> |
181 | ||
182 | </refsect1> | |
183 | ||
99e4008c | 184 | &seealso; |
d823d5b9 | 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 | --> |