blob: 18df5e40eb9edfc49ca461439d1c1917c2f38868 [file] [log] [blame] [raw]
.TH vzlist 8 "4 Jul 2011" "OpenVZ" "Containers"
.SH NAME
vzlist \- show various information about containers
.SH SYNOPSIS
.SY vzlist
[\fB-a\fR | \fB-S\fR]
.OP -n
.OP -H
.OP -o "name\fR[,\fIname\fR...] | \fB-1\fR"
.OP -s \fR[\fB-\fR]\fIname
.OP -h pattern
.OP -N pattern
.OP -d pattern
[\fICTID\fR [\fICTID\fR ...]]
.SY vzlist
\fB-L\fR | \fB--list\fR
.SY vzlist
.B --help
.YS
.SH DESCRIPTION
This utility is used for listing containers and their parameters.
By default only running containers are listed.
If one or more \fICTID\fRs are specified, only specified containers are
displayed.
.PP
For the fields that can have many values (e.g. \fBip\fR),
all the values are displayed only for the last (i.e. leftmost) column;
otherwise, only the first value is shown.
.SH OPTIONS
.IP "\fB-a\fR, \fB--all\fR"
List all containers.
.IP "\fB-S\fR, \fB--stopped\fR"
List only not running containers (including the ones with status shown as
\fBmounted\fR or \fBsuspended\fR).
.IP "\fB-n\fR, \fB--name\fR"
Display container names instead of hostnames.
.IP "\fB-H\fR, \fB--no-header\fR"
Suppress displaying the header row.
.IP "\fB-o\fR, \fB--output\fR \fIfield\fR[,\fIfield\fR...]"
Display only the specified \fIfield\fRs (see \fBStandard fields\fR
subsection below).
.IP \fB-1\fR
Synonym for \fB-H -octid\fR, i.e. only show container IDs, one per line.
.IP "\fB-s\fR, \fB--sort\fR [\fB-\fR]\fIfield\fR"
Sort by the value of \fIfield\fR (possible arguments are the same
as for \fB-o\fR). The \fB-\fR before the field name means sorting
in the reverse order.
.SS 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. \fB*\fR, \fB?\fR, and \fB[]\fR).
Note: to avoid expansion of wildcards by the shell, one have to escape
the pattern by either putting it into single quotes (like \fB'a*a'\fR)
or by adding a backslash before the wildcard character (like \fBa\\*a\fR).
.IP "\fB-h\fR, \fB--hostname\fR \fIpattern\fR"
List only containers whose hostnames matches the \fIpattern\fR.
.IP "\fB-N\fR, \fB--name_filter\fR \fIpattern\fR"
List only containers whose names matches the \fIpattern\fR.
.IP "\fB-d\fR, \fB--description\fR \fIpattern\fR"
List only containers with descriptions matching the \fIpattern\fR.
.SS Possible fields
.IP "\fB-L\fR, \fB--list\fR"
list all available format specifiers that can be used for
both output (\fB-o\fR, \fB--output\fR) and the sorting order
(\fB-s\fR, \fB--sort\fR).
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:
.RS
.TP
.B .m
maxheld
.TP
.B .b
barrier
.TP
.B .l
limit
.TP
.B .f
fail counter
.PP
For the disk quota fields, if suffix is not specified, current usage
is shown. One can also use the following suffixes:
.TP
.B .s
soft limit
.TP
.B .h
hard limit
.RE
.SH EXAMPLES
.TP
.B vzlist -o ctid,kmemsize,kmemsize.l -s kmemsize
Show CTIDs, kmemsize usage, and kmemsize limit for all running containers,
sorted by the kmemsize usage.
.SH EXIT STATUS
Returns 0 upon success.
.SH COPYRIGHT
Copyright (C) 2000-2011, Parallels, Inc. Licensed under GNU GPL.