Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Man/vzlist.8

6,412 bytes added, 22:16, 3 June 2011
Automated import of articles
== NAME ==

<p style="margin-left:11%; margin-top: 1em">vzlist &minus;
containers listing utility</p>

== SYNOPSIS ==

<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">

<p style="margin-top: 1em"><b>vzlist</b></p></td>
<td width="2%"></td>
<td width="78%">

<p style="margin-top: 1em">[<b>-a</b> | <b>-S</b>]
[<b>-n</b>] [<b>-H</b>]
[<b>-o&nbsp;</b><i>name</i>[,<i>name</i>...] | <b>-1</b>]
[<b>-s&nbsp;</b>[<b>-</b>]<i>name</i>]
[<b>-h&nbsp;</b><i>pattern</i>]
[<b>-N&nbsp;</b><i>pattern</i>]
[<b>-d&nbsp;</b><i>pattern</i>] [<i>CTID</i> [<i>CTID</i>
...]]</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">

<p><b>vzlist</b></p></td>
<td width="2%"></td>
<td width="78%">

<p><b>-L</b> | <b>--list</b></p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">

<p><b>vzlist</b></p></td>
<td width="2%"></td>
<td width="78%">

<p><b>--help</b></p></td></tr>
</table>

== DESCRIPTION ==

<p style="margin-left:11%; margin-top: 1em">This utility is
used for listing containers and their parameters. By default
only running containers are listed. If one or more
<i>CTID</i>s are specified, only specified containers are
displayed.</p>

<p style="margin-left:11%; margin-top: 1em">For the fields
that can have many values (e.g. <b>ip</b>), all the values
are displayed only for the last (i.e. leftmost) column;
otherwise, only the first value is shown.</p>

== OPTIONS ==

<p style="margin-left:11%; margin-top: 1em"><b>-a</b>,
<b>--all</b></p>

<p style="margin-left:22%;">List all containers.</p>

<p style="margin-left:11%;"><b>-S</b>, <b>--stopped</b></p>

<p style="margin-left:22%;">List only not running
containers (including the ones with status shown as
<b>mounted</b> or <b>suspended</b>).</p>

<p style="margin-left:11%;"><b>-n</b>, <b>--name</b></p>

<p style="margin-left:22%;">Display container names instead
of hostnames.</p>

<p style="margin-left:11%;"><b>-H</b>,
<b>--no-header</b></p>

<p style="margin-left:22%;">Suppress displaying the header
row.</p>

<p style="margin-left:11%;"><b>-o</b>, <b>--output</b>
<i>field</i>[,<i>field</i>...]</p>

<p style="margin-left:22%;">Display only the specified
<i>field</i>s (see <b>Standard fields</b> subsection
below).</p>

<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">

<p><b>-1</b></p></td>
<td width="8%"></td>
<td width="78%">

<p>Synonym for <b>-H -octid</b>, i.e. only show container
IDs, one per line.</p></td></tr>
</table>

<p style="margin-left:11%;"><b>-s</b>, <b>--sort</b>
[<b>-</b>]<i>field</i></p>

<p style="margin-left:22%;">Sort by the value of
<i>field</i> (possible arguments are the same as for
<b>-o</b>). The <b>-</b> before the field name means sorting
in the reverse order.</p>

=== Output filters ===

<p style="margin-top: 1em">List of CTs can be further
filtered using the following options. For patterns one can
use the same wildcards as in shell (i.e. <b>*</b>, <b>?</b>,
and <b>[]</b>). Note: to avoid expansion of wildcards by the
shell, one have to escape the pattern by either putting it
into single quotes (like <b>&rsquo;a*a&rsquo;</b>) or by
adding a backslash before the wildcard character (like
<b>a\*a</b>).</p>

<p style="margin-left:11%;"><b>-h</b>, <b>--hostname</b>
<i>pattern</i></p>

<p style="margin-left:22%;">List only containers whose
hostnames matches the <i>pattern</i>.</p>

<p style="margin-left:11%;"><b>-N</b>, <b>--name_filter</b>
<i>pattern</i></p>

<p style="margin-left:22%;">List only containers whose
names matches the <i>pattern</i>.</p>

<p style="margin-left:11%;"><b>-d</b>, <b>--description</b>
<i>pattern</i></p>

<p style="margin-left:22%;">List only containers with
descriptions matching the <i>pattern</i>.</p>

=== Possible fields ===

<p style="margin-left:11%;"><b>-L</b>, <b>--list</b></p>

<p style="margin-left:22%;">list all available format
specifiers that can be used for both output both output
(<b>-o</b>, <b>--output</b>) and the sorting order
(<b>-s</b>, <b>--sort</b>).</p>

<p style="margin-left:22%; margin-top: 1em">For the user
beancounter fields, if suffix is not specified, current
usage (a.k.a. &quot;held&quot;) value is show. One can also
use the following suffixes:</p>

<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="22%"></td>
<td width="3%">

<p><b>.m</b></p></td>
<td width="7%"></td>
<td width="19%">

<p>maxheld</p></td>
<td width="49%">
</td></tr>
<tr valign="top" align="left">
<td width="22%"></td>
<td width="3%">

<p><b>.b</b></p></td>
<td width="7%"></td>
<td width="19%">

<p>barrier</p></td>
<td width="49%">
</td></tr>
<tr valign="top" align="left">
<td width="22%"></td>
<td width="3%">

<p><b>.l</b></p></td>
<td width="7%"></td>
<td width="19%">

<p>limit</p></td>
<td width="49%">
</td></tr>
<tr valign="top" align="left">
<td width="22%"></td>
<td width="3%">

<p><b>.f</b></p></td>
<td width="7%"></td>
<td width="19%">

<p>fail counter</p></td>
<td width="49%">
</td></tr>
</table>

<p style="margin-left:22%; margin-top: 1em">For the disk
quota fields, if suffix is not specified, current usage is
shown. One can also use the following suffixes:</p>

<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="22%"></td>
<td width="3%">

<p style="margin-top: 1em"><b>.s</b></p></td>
<td width="7%"></td>
<td width="16%">

<p style="margin-top: 1em">soft limit</p></td>
<td width="52%">
</td></tr>
<tr valign="top" align="left">
<td width="22%"></td>
<td width="3%">

<p><b>.h</b></p></td>
<td width="7%"></td>
<td width="16%">

<p>hard limit</p></td>
<td width="52%">
</td></tr>
</table>

== EXAMPLES ==

<p style="margin-left:11%; margin-top: 1em"><b>vzlist -o
ctid,kmemsize,kmemsize.l -s kmemsize</b></p>

<p style="margin-left:22%;">Show CTIDs, kmemsize usage, and
kmemsize limit for all running containers, sorted by the
kmemsize usage.</p>

== RETURN CODE ==

<p style="margin-left:11%; margin-top: 1em">Returns 0 upon
success.</p>

== COPYRIGHT ==

<p style="margin-left:11%; margin-top: 1em">Copyright (C)
2000-2011, Parallels, Inc. Licensed under GNU GPL.</p>
2,253
edits