Difference between revisions of "Man/vzlist.8"

From OpenVZ Virtuozzo Containers Wiki
< Man
Jump to: navigation, search
(Automated import of articles *** existing text overwritten ***)
(Automated import of articles *** existing text overwritten ***)
 
Line 100: 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>Standard fields</b> subsection
+
<i>field</i>s (see <b>Possible fields</b> subsection
 
below).</p>
 
below).</p>
  
Line 163: Line 163:
 
<b>--sort</b>).</p>
 
<b>--sort</b>).</p>
  
<p style="margin-left:22%; margin-top: 1em">For the user
+
<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. &quot;held&quot;) value is show. One can also
 
usage (a.k.a. &quot;held&quot;) value is show. One can also
Line 171: Line 171:
 
       cellspacing="0" cellpadding="0">
 
       cellspacing="0" cellpadding="0">
 
<tr valign="top" align="left">
 
<tr valign="top" align="left">
<td width="22%"></td>
+
<td width="11%"></td>
 
<td width="3%">
 
<td width="3%">
  
 
<p><b>.m</b></p></td>
 
<p><b>.m</b></p></td>
<td width="7%"></td>
+
<td width="8%"></td>
<td width="19%">
+
<td width="18%">
  
 
<p>maxheld</p></td>
 
<p>maxheld</p></td>
<td width="49%">
+
<td width="60%">
 
</td></tr>
 
</td></tr>
 
<tr valign="top" align="left">
 
<tr valign="top" align="left">
<td width="22%"></td>
+
<td width="11%"></td>
 
<td width="3%">
 
<td width="3%">
  
 
<p><b>.b</b></p></td>
 
<p><b>.b</b></p></td>
<td width="7%"></td>
+
<td width="8%"></td>
<td width="19%">
+
<td width="18%">
  
 
<p>barrier</p></td>
 
<p>barrier</p></td>
<td width="49%">
+
<td width="60%">
 
</td></tr>
 
</td></tr>
 
<tr valign="top" align="left">
 
<tr valign="top" align="left">
<td width="22%"></td>
+
<td width="11%"></td>
 
<td width="3%">
 
<td width="3%">
  
 
<p><b>.l</b></p></td>
 
<p><b>.l</b></p></td>
<td width="7%"></td>
+
<td width="8%"></td>
<td width="19%">
+
<td width="18%">
  
 
<p>limit</p></td>
 
<p>limit</p></td>
<td width="49%">
+
<td width="60%">
 
</td></tr>
 
</td></tr>
 
<tr valign="top" align="left">
 
<tr valign="top" align="left">
<td width="22%"></td>
+
<td width="11%"></td>
 
<td width="3%">
 
<td width="3%">
  
 
<p><b>.f</b></p></td>
 
<p><b>.f</b></p></td>
<td width="7%"></td>
+
<td width="8%"></td>
<td width="19%">
+
<td width="18%">
  
 
<p>fail counter</p></td>
 
<p>fail counter</p></td>
<td width="49%">
+
<td width="60%">
 
</td></tr>
 
</td></tr>
 
</table>
 
</table>
  
<p style="margin-left:22%; margin-top: 1em">For the disk
+
<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 223: Line 223:
 
       cellspacing="0" cellpadding="0">
 
       cellspacing="0" cellpadding="0">
 
<tr valign="top" align="left">
 
<tr valign="top" align="left">
<td width="22%"></td>
+
<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="7%"></td>
+
<td width="8%"></td>
<td width="16%">
+
<td width="15%">
  
 
<p style="margin-top: 1em">soft limit</p></td>
 
<p style="margin-top: 1em">soft limit</p></td>
<td width="52%">
+
<td width="63%">
 
</td></tr>
 
</td></tr>
 
<tr valign="top" align="left">
 
<tr valign="top" align="left">
<td width="22%"></td>
+
<td width="11%"></td>
 
<td width="3%">
 
<td width="3%">
  
 
<p><b>.h</b></p></td>
 
<p><b>.h</b></p></td>
<td width="7%"></td>
+
<td width="8%"></td>
<td width="16%">
+
<td width="15%">
  
 
<p>hard limit</p></td>
 
<p>hard limit</p></td>
<td width="52%">
+
<td width="63%">
 
</td></tr>
 
</td></tr>
 
</table>
 
</table>
  
<p style="margin-left:11%;">Note that for JSON output
+
<p style="margin-left:11%; margin-top: 1em">Note that for
suffixes are not allowed.</p>
+
JSON output suffixes are not allowed.</p>
  
 
== EXAMPLES ==
 
== EXAMPLES ==

Latest revision as of 01:42, 30 October 2013

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.