lxc-info.sgml.in revision b9d957c316c3827898b91cc69788d90be3260935
e2f91e3434ddf2d4cb85d2385057a492eb462166Fox Wilson<!--
51ee3c5891d7e95247adb6b605a2e3ab591dc449Evgeni Golov
b515981702133b9aaea1aff378493f054c14d46cDwight Engen(C) Copyright Canonical Ltd. 2013
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane Graber
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane GraberAuthors:
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane GraberStéphane Graber <stgraber@ubuntu.com>
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane Graber
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane GraberThis library is free software; you can redistribute it and/or
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane Grabermodify it under the terms of the GNU Lesser General Public
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane GraberLicense as published by the Free Software Foundation; either
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane Graberversion 2.1 of the License, or (at your option) any later version.
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane Graber
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane GraberThis library is distributed in the hope that it will be useful,
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane Graberbut WITHOUT ANY WARRANTY; without even the implied warranty of
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane GraberMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane GraberLesser General Public License for more details.
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane Graber
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane GraberYou should have received a copy of the GNU Lesser General Public
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane GraberLicense along with this library; if not, write to the Free Software
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane GraberFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane Graber
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane Graber-->
250b1eec71b074acdff1c5f6b5a1f0d7d2c20b77Stéphane Graber
2edd7a881d7d6b94c13d18c28ce6a6a15966ed31Stéphane Graber<!DOCTYPE refentry PUBLIC @docdtd@ [
2edd7a881d7d6b94c13d18c28ce6a6a15966ed31Stéphane Graber
b515981702133b9aaea1aff378493f054c14d46cDwight Engen<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
b515981702133b9aaea1aff378493f054c14d46cDwight Engen<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
b515981702133b9aaea1aff378493f054c14d46cDwight Engen]>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen
b515981702133b9aaea1aff378493f054c14d46cDwight Engen<refentry>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
39ffde307ad83bd407aaa6a0d81682902bab248bStéphane Graber
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <refmeta>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <refentrytitle>lxc-info</refentrytitle>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <manvolnum>1</manvolnum>
39ffde307ad83bd407aaa6a0d81682902bab248bStéphane Graber </refmeta>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <refnamediv>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <refname>lxc-info</refname>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <refpurpose>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen query information about a container
b515981702133b9aaea1aff378493f054c14d46cDwight Engen </refpurpose>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen </refnamediv>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <refsynopsisdiv>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <cmdsynopsis>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <command>lxc-info</command>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <arg choice="opt">-n <replaceable>name</replaceable></arg>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <arg choice="opt">-c <replaceable>KEY</replaceable></arg>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <arg choice="opt">-s</arg>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <arg choice="opt">-p</arg>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <arg choice="opt">-i</arg>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <arg choice="opt">-t <replaceable>state</replaceable></arg>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <arg choice="opt">-S</arg>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <arg choice="opt">-H</arg>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen </cmdsynopsis>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen </refsynopsisdiv>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <refsect1>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <title>Description</title>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <para>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <command>lxc-info</command> queries and shows information about
b515981702133b9aaea1aff378493f054c14d46cDwight Engen containers.
b515981702133b9aaea1aff378493f054c14d46cDwight Engen </para>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen </refsect1>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <refsect1>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <title>Options</title>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <variablelist>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <varlistentry>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <term>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <option><optional>-n <replaceable>name</replaceable></optional></option>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen </term>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <listitem>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen <para>
b515981702133b9aaea1aff378493f054c14d46cDwight Engen The container name. It is interpreted as a regular expression,
so it is possible to get information on all containers, several
of them or just one. See
<citerefentry>
<refentrytitle><command>regex</command></refentrytitle>
<manvolnum>7</manvolnum>
</citerefentry> for regular expression syntax. If not specified,
<replaceable>name</replaceable> will default to '.*' which
will give information on all containers in
<command>lxcpath</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option><optional>-c <replaceable>KEY</replaceable></optional></option>
</term>
<listitem>
<para>
Print a configuration key from the running container. This option
may be given mulitple times to print out multiple key = value pairs.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option><optional>-s</optional></option>
</term>
<listitem>
<para>
Just print the container's state.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option><optional>-p</optional></option>
</term>
<listitem>
<para>
Just print the container's pid.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option><optional>-i</optional></option>
</term>
<listitem>
<para>
Just print the container's IP addresses.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option><optional>-S</optional></option>
</term>
<listitem>
<para>
Just print the container's statistics.
Note that for performance reasons the kernel does not account
kernel memory use unless a kernel memory limit is set. If a limit
is not set, <command>lxc-info</command> will display kernel memory
use as 0. A limit can be set by specifying
<programlisting>
lxc.cgroup.memory.kmem.limit_in_bytes = <replaceable>number</replaceable>
</programlisting>
in your container configuration file, see
<citerefentry>
<refentrytitle>lxc.conf</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option><optional>-H</optional></option>
</term>
<listitem>
<para>
Print the container's statistics in raw, non-humanized form. The
default is to print statistics in humanized form.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option><optional>-t <replaceable>state</replaceable></optional></option>
</term>
<listitem>
<para>
Check whether the container is in the provided state.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
&commonoptions;
<refsect1>
<title>Examples</title>
<variablelist>
<varlistentry>
<term>lxc-info -n foo</term>
<listitem>
<para>
Show information for foo.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lxc-info -n 'ubuntu.*'</term>
<listitem>
<para>
Show information for all containers whose name starts with ubuntu.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lxc-info -n foo -t RUNNING</term>
<listitem>
<para>
exits 0 if foo is RUNNING, 1 otherwise.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lxc-info -n foo -c lxc.network.0.veth.pair</term>
<listitem>
<para>
prints the veth pair name of foo.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
&seealso;
<refsect1>
<title>Author</title>
<para>Stéphane Graber <email>stgraber@ubuntu.com</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:
-->