Difference between revisions of "Man/vzlist.8"

From OpenVZ Virtuozzo Containers Wiki
< Man
Jump to: navigation, search
(Automated import of articles)
(No difference)

Revision as of 22:16, 3 June 2011

NAME

vzlist − containers listing utility

SYNOPSIS

vzlist

[-a | -S] [-n] [-H] [-o name[,name...] | -1] [-s [-]name] [-h pattern] [-N pattern] [-d pattern] [CTID [CTID ...]]

vzlist

-L | --list

vzlist

--help

DESCRIPTION

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 the fields that can have many values (e.g. ip), all the values are displayed only for the last (i.e. leftmost) column; otherwise, only the first value is shown.

OPTIONS

-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.

-o, --output field[,field...]

Display only the specified fields (see Standard 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

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

-L, --list

list all available format specifiers that can be used for both output 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

EXAMPLES

vzlist -o ctid,kmemsize,kmemsize.l -s kmemsize

Show CTIDs, kmemsize usage, and kmemsize limit for all running containers, sorted by the kmemsize usage.

RETURN CODE

Returns 0 upon success.

COPYRIGHT

Copyright (C) 2000-2011, Parallels, Inc. Licensed under GNU GPL.