Difference between revisions of "Man/vzlist.8"
Botinki Kira (talk | contribs) (Automated import of articles *** existing text overwritten ***) |
Botinki Kira (talk | contribs) (Automated import of articles *** existing text overwritten ***) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 17: | Line 17: | ||
<p style="margin-top: 1em">[<b>-a</b> | <b>-S</b>] | <p style="margin-top: 1em">[<b>-a</b> | <b>-S</b>] | ||
− | [<b>-n</b>] [<b>-H</b>] | + | [<b>-n</b>] [<b>-H</b>] [<b>-t</b>] [<b>-j</b>] |
[<b>-o </b><i>name</i>[,<i>name</i>...] | <b>-1</b>] | [<b>-o </b><i>name</i>[,<i>name</i>...] | <b>-1</b>] | ||
[<b>-s </b>[<b>-</b>]<i>name</i>] | [<b>-s </b>[<b>-</b>]<i>name</i>] | ||
Line 52: | Line 52: | ||
displayed.</p> | displayed.</p> | ||
− | <p style="margin-left:11%; margin-top: 1em">For | + | <p style="margin-left:11%; margin-top: 1em">For some fields |
− | that can have | + | that can have long values (e.g. <b>ip</b>, <b>hostname</b>, |
− | + | <b>description</b> or <b>features</b>), the value string is | |
− | + | trimmed to some predefined width (in order not to break the | |
+ | columned layout), unless this field is the last one. So, in | ||
+ | order to get the full non-trimmed value for such a field, | ||
+ | put the field name last in the list of fields for <b>-o</b> | ||
+ | option. If using <b>vzlist</b> from a script, add <b>-t</b> | ||
+ | to disable trimming.</p> | ||
== OPTIONS == | == OPTIONS == | ||
Line 79: | Line 84: | ||
<p style="margin-left:22%;">Suppress displaying the header | <p style="margin-left:22%;">Suppress displaying the header | ||
− | row.</p> | + | row. Usable for scripts.</p> |
+ | |||
+ | <p style="margin-left:11%;"><b>-t</b>, <b>--no-trim</b></p> | ||
+ | |||
+ | <p style="margin-left:22%;">Suppress trimming long fields. | ||
+ | Usable for scripts.</p> | ||
+ | |||
+ | <p style="margin-left:11%;"><b>-j</b>, <b>--json</b></p> | ||
+ | |||
+ | <p style="margin-left:22%;">Output in JSON format. By | ||
+ | default, all possible fields are printed.</p> | ||
<p style="margin-left:11%;"><b>-o</b>, <b>--output</b> | <p style="margin-left:11%;"><b>-o</b>, <b>--output</b> | ||
Line 85: | Line 100: | ||
<p style="margin-left:22%;">Display only the specified | <p style="margin-left:22%;">Display only the specified | ||
− | <i>field</i>s (see <b> | + | <i>field</i>s (see <b>Possible fields</b> subsection |
below).</p> | below).</p> | ||
Line 144: | Line 159: | ||
<p style="margin-left:22%;">list all available format | <p style="margin-left:22%;">list all available format | ||
− | specifiers that can be used for both output | + | specifiers that can be used for both output (<b>-o</b>, |
− | (<b>-o</b>, <b>--output</b>) and the sorting order | + | <b>--output</b>) and the sorting order (<b>-s</b>, |
− | (<b>-s</b>, <b>--sort</b>).</p> | + | <b>--sort</b>).</p> |
− | <p style="margin-left: | + | <p style="margin-left:11%; margin-top: 1em">For the user |
beancounter fields, if suffix is not specified, current | beancounter fields, if suffix is not specified, current | ||
usage (a.k.a. "held") value is show. One can also | usage (a.k.a. "held") value is show. One can also | ||
Line 156: | Line 171: | ||
cellspacing="0" cellpadding="0"> | cellspacing="0" cellpadding="0"> | ||
<tr valign="top" align="left"> | <tr valign="top" align="left"> | ||
− | <td width=" | + | <td width="11%"></td> |
<td width="3%"> | <td width="3%"> | ||
<p><b>.m</b></p></td> | <p><b>.m</b></p></td> | ||
− | <td width=" | + | <td width="8%"></td> |
− | <td width=" | + | <td width="18%"> |
<p>maxheld</p></td> | <p>maxheld</p></td> | ||
− | <td width=" | + | <td width="60%"> |
</td></tr> | </td></tr> | ||
<tr valign="top" align="left"> | <tr valign="top" align="left"> | ||
− | <td width=" | + | <td width="11%"></td> |
<td width="3%"> | <td width="3%"> | ||
<p><b>.b</b></p></td> | <p><b>.b</b></p></td> | ||
− | <td width=" | + | <td width="8%"></td> |
− | <td width=" | + | <td width="18%"> |
<p>barrier</p></td> | <p>barrier</p></td> | ||
− | <td width=" | + | <td width="60%"> |
</td></tr> | </td></tr> | ||
<tr valign="top" align="left"> | <tr valign="top" align="left"> | ||
− | <td width=" | + | <td width="11%"></td> |
<td width="3%"> | <td width="3%"> | ||
<p><b>.l</b></p></td> | <p><b>.l</b></p></td> | ||
− | <td width=" | + | <td width="8%"></td> |
− | <td width=" | + | <td width="18%"> |
<p>limit</p></td> | <p>limit</p></td> | ||
− | <td width=" | + | <td width="60%"> |
</td></tr> | </td></tr> | ||
<tr valign="top" align="left"> | <tr valign="top" align="left"> | ||
− | <td width=" | + | <td width="11%"></td> |
<td width="3%"> | <td width="3%"> | ||
<p><b>.f</b></p></td> | <p><b>.f</b></p></td> | ||
− | <td width=" | + | <td width="8%"></td> |
− | <td width=" | + | <td width="18%"> |
<p>fail counter</p></td> | <p>fail counter</p></td> | ||
− | <td width=" | + | <td width="60%"> |
</td></tr> | </td></tr> | ||
</table> | </table> | ||
− | <p style="margin-left: | + | <p style="margin-left:11%; margin-top: 1em">For the disk |
quota fields, if suffix is not specified, current usage is | quota fields, if suffix is not specified, current usage is | ||
shown. One can also use the following suffixes:</p> | shown. One can also use the following suffixes:</p> | ||
Line 208: | Line 223: | ||
cellspacing="0" cellpadding="0"> | cellspacing="0" cellpadding="0"> | ||
<tr valign="top" align="left"> | <tr valign="top" align="left"> | ||
− | <td width=" | + | <td width="11%"></td> |
<td width="3%"> | <td width="3%"> | ||
<p style="margin-top: 1em"><b>.s</b></p></td> | <p style="margin-top: 1em"><b>.s</b></p></td> | ||
− | <td width=" | + | <td width="8%"></td> |
− | <td width=" | + | <td width="15%"> |
<p style="margin-top: 1em">soft limit</p></td> | <p style="margin-top: 1em">soft limit</p></td> | ||
− | <td width=" | + | <td width="63%"> |
</td></tr> | </td></tr> | ||
<tr valign="top" align="left"> | <tr valign="top" align="left"> | ||
− | <td width=" | + | <td width="11%"></td> |
<td width="3%"> | <td width="3%"> | ||
<p><b>.h</b></p></td> | <p><b>.h</b></p></td> | ||
− | <td width=" | + | <td width="8%"></td> |
− | <td width=" | + | <td width="15%"> |
<p>hard limit</p></td> | <p>hard limit</p></td> | ||
− | <td width=" | + | <td width="63%"> |
</td></tr> | </td></tr> | ||
</table> | </table> | ||
+ | |||
+ | <p style="margin-left:11%; margin-top: 1em">Note that for | ||
+ | JSON output suffixes are not allowed.</p> | ||
== EXAMPLES == | == EXAMPLES == |
Latest revision as of 01:42, 30 October 2013
Contents
NAME[edit]
vzlist − show various information about containers
SYNOPSIS[edit]
vzlist |
[-a | -S] [-n] [-H] [-t] [-j] [-o name[,name...] | -1] [-s [-]name] [-h pattern] [-N pattern] [-d pattern] [CTID [CTID ...]] | ||
vzlist |
-L | --list | ||
vzlist |
--help |
DESCRIPTION[edit]
This utility is used for listing containers and their parameters. By default only running containers are listed. If one or more CTIDs are specified, only specified containers are displayed.
For some fields that can have long values (e.g. ip, hostname, description or features), the value string is trimmed to some predefined width (in order not to break the columned layout), unless this field is the last one. So, in order to get the full non-trimmed value for such a field, put the field name last in the list of fields for -o option. If using vzlist from a script, add -t to disable trimming.
OPTIONS[edit]
-a, --all
List all containers.
-S, --stopped
List only not running containers (including the ones with status shown as mounted or suspended).
-n, --name
Display container names instead of hostnames.
-H, --no-header
Suppress displaying the header row. Usable for scripts.
-t, --no-trim
Suppress trimming long fields. Usable for scripts.
-j, --json
Output in JSON format. By default, all possible fields are printed.
-o, --output field[,field...]
Display only the specified fields (see Possible fields subsection below).
-1 |
Synonym for -H -octid, i.e. only show container IDs, one per line. |
-s, --sort [-]field
Sort by the value of field (possible arguments are the same as for -o). The - before the field name means sorting in the reverse order.
Output filters[edit]
List of CTs can be further filtered using the following options. For patterns one can use the same wildcards as in shell (i.e. *, ?, and []). Note: to avoid expansion of wildcards by the shell, one have to escape the pattern by either putting it into single quotes (like ’a*a’) or by adding a backslash before the wildcard character (like a\*a).
-h, --hostname pattern
List only containers whose hostnames matches the pattern.
-N, --name_filter pattern
List only containers whose names matches the pattern.
-d, --description pattern
List only containers with descriptions matching the pattern.
Possible fields[edit]
-L, --list
list all available format specifiers that can be used for both output (-o, --output) and the sorting order (-s, --sort).
For the user beancounter fields, if suffix is not specified, current usage (a.k.a. "held") value is show. One can also use the following suffixes:
.m |
maxheld |
|||
.b |
barrier |
|||
.l |
limit |
|||
.f |
fail counter |
For the disk quota fields, if suffix is not specified, current usage is shown. One can also use the following suffixes:
.s |
soft limit |
|||
.h |
hard limit |
Note that for JSON output suffixes are not allowed.
EXAMPLES[edit]
vzlist -o ctid,kmemsize,kmemsize.l -s kmemsize
Show CTIDs, kmemsize usage, and kmemsize limit for all running containers, sorted by the kmemsize usage.
EXIT STATUS[edit]
Returns 0 upon success.
COPYRIGHT[edit]
Copyright (C) 2000-2011, Parallels, Inc. Licensed under GNU GPL.