lxc-stop.sgml.in revision 13bc2fd2370f8e3778d81f58ac8dda5746550a4f
1281N/A<!--
144N/A
144N/Alxc: linux Container library
144N/A
1281N/A(C) Copyright IBM Corp. 2007, 2008
144N/A
144N/AAuthors:
144N/ADaniel Lezcano <daniel.lezcano at free.fr>
144N/A
144N/AThis library is free software; you can redistribute it and/or
144N/Amodify it under the terms of the GNU Lesser General Public
144N/ALicense as published by the Free Software Foundation; either
144N/Aversion 2.1 of the License, or (at your option) any later version.
144N/A
144N/AThis library is distributed in the hope that it will be useful,
144N/Abut WITHOUT ANY WARRANTY; without even the implied warranty of
144N/AMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
144N/ALesser General Public License for more details.
144N/A
144N/AYou should have received a copy of the GNU Lesser General Public
144N/ALicense along with this library; if not, write to the Free Software
1186N/AFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1186N/A
1186N/A-->
1186N/A
1186N/A<!DOCTYPE refentry PUBLIC @docdtd@ [
1186N/A
1186N/A<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
1281N/A<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
1281N/A]>
1470N/A
1330N/A<refentry>
1330N/A
1330N/A <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
1330N/A
1330N/A <refmeta>
1419N/A <refentrytitle>lxc-stop</refentrytitle>
1186N/A <manvolnum>1</manvolnum>
1186N/A </refmeta>
1186N/A
1186N/A <refnamediv>
1186N/A <refname>lxc-stop</refname>
1364N/A
1281N/A <refpurpose>
1281N/A stop the application running inside a container
1281N/A </refpurpose>
1186N/A </refnamediv>
1186N/A
1186N/A <refsynopsisdiv>
1281N/A <cmdsynopsis>
1281N/A <command>lxc-stop</command>
1281N/A <arg choice="req">-n <replaceable>name</replaceable></arg>
1281N/A <arg choice="opt">-W</arg>
1281N/A <arg choice="opt">-r</arg>
1281N/A <arg choice="opt">-t <replaceable>timeout</replaceable></arg>
1186N/A <arg choice="opt">-k</arg>
1186N/A <arg choice="opt">--nokill</arg>
1186N/A <arg choice="opt">--nolock</arg>
1281N/A </cmdsynopsis>
1281N/A </refsynopsisdiv>
1281N/A
1186N/A <refsect1>
1186N/A <title>Description</title>
1186N/A
1281N/A <para>
1281N/A <command>lxc-stop</command> reboots, cleanly shuts down, or kills
1281N/A all the processes inside the container. By default, it will
1281N/A request a clean shutdown of the container by sending
1281N/A <command>lxc.haltsignal</command> (defaults to SIGPWR) to
1186N/A the container's init process, waiting up to 60 seconds for the container
1186N/A to exit, and then returning. If the container fails to cleanly exit in
1186N/A 60 seconds, it will be sent the <command>lxc.stopsignal</command>
1281N/A (defaults to SIGKILL) to force it to shut down.
1281N/A </para>
1281N/A <para>
1281N/A The <optional>-W</optional>, <optional>-r</optional>,
1281N/A <optional>-k</optional> and <optional>--nokill</optional>
1281N/A options specify the action to perform.
1281N/A <optional>-W</optional> indicates that after performing the specified
1281N/A action, <command>lxc-stop</command> should immediately exit, while
1281N/A <optional>-t TIMEOUT</optional> specifies the maximum amount of time
1281N/A to wait for the container to complete the shutdown or reboot.
1281N/A </para>
1186N/A </refsect1>
1186N/A
1186N/A <refsect1>
1281N/A <title>Options</title>
1281N/A <variablelist>
1281N/A
1281N/A <varlistentry>
1281N/A <term>
1281N/A <option>-r,--reboot </option>
1281N/A </term>
1281N/A <listitem>
1281N/A <para>
1281N/A Request a reboot of the container.
1281N/A </para>
1281N/A </listitem>
1281N/A </varlistentry>
1281N/A
1281N/A <varlistentry>
1281N/A <term>
1281N/A <option>-k,--kill </option>
1281N/A </term>
1281N/A <listitem>
1186N/A <para>
1281N/A Rather than requesting a clean shutdown of the container, explicitly
1186N/A kill all tasks in the container. This is the legacy
1281N/A <command>lxc-stop</command> behavior.
1281N/A </para>
1186N/A </listitem>
1281N/A </varlistentry>
1186N/A
1281N/A <varlistentry>
1281N/A <term>
1186N/A <option>--nokill</option>
1281N/A </term>
1281N/A <listitem>
1186N/A <para>
1281N/A Only request a clean shutdown, do not kill the container tasks if the
1186N/A clean shutdown fails.
1281N/A </para>
1186N/A </listitem>
1120N/A </varlistentry>
1186N/A
1281N/A <varlistentry>
1186N/A <term>
1390N/A <option>--nolock </option>
1186N/A </term>
1186N/A <listitem>
1186N/A <para>
1186N/A This option avoids the use of any of the API lxc locking, and should
1186N/A only be used if <command>lxc-stop</command> is hanging due to a bad
1186N/A system state.
1186N/A </para>
1186N/A </listitem>
1186N/A </varlistentry>
1186N/A
1186N/A <varlistentry>
1186N/A <term>
1186N/A <option>-W,--nowait </option>
1186N/A </term>
1281N/A <listitem>
1186N/A <para>
1186N/A Simply perform the requestion action (reboot, shutdown, or hard
1281N/A kill) and exit.
1186N/A </para>
1186N/A </listitem>
1186N/A </varlistentry>
1186N/A
1390N/A <varlistentry>
849N/A <term>
1281N/A <option>-t,--timeout <replaceable>TIMEOUT</replaceable></option>
1419N/A </term>
1281N/A <listitem>
1281N/A <para>
1469N/A Wait TIMEOUT seconds before hard-stopping the container.
1186N/A </para>
1281N/A </listitem>
1186N/A </varlistentry>
1469N/A
1281N/A </variablelist>
1281N/A </refsect1>
1419N/A
1281N/A <refsect1>
1281N/A <title>Exit value</title>
1469N/A
1281N/A <variablelist>
1281N/A
1469N/A <varlistentry>
1469N/A <term>0</term>
1186N/A <listitem>
1186N/A <para>
1419N/A The container was successfully stopped.
1186N/A </para>
1278N/A </listitem>
1469N/A </varlistentry>
1278N/A
1186N/A <varlistentry>
1281N/A <term>1</term>
1186N/A <listitem>
1186N/A <para>
1281N/A An error occurred while stopping the container.
1186N/A </para>
1186N/A </listitem>
1186N/A </varlistentry>
1186N/A
1186N/A <varlistentry>
1186N/A <term>2</term>
1186N/A <listitem>
1186N/A <para>
The specified container exists but was not running.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Diagnostic</title>
<variablelist>
<varlistentry>
<term>The container was not found</term>
<listitem>
<para>
The specified container was not created before with
the <command>lxc-create</command> command.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
&seealso;
<refsect1>
<title>Author</title>
<para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->