| .TH vzctl 8 "25 May 2011" "OpenVZ" "Containers" |
| .SH NAME |
| vzubc \- show User Beancounters in a human-readable format. |
| .SH SYNOPSIS |
| vzubc [\fIoption\fR ...] [\fICTID\fR ...] |
| .SH DESCRIPTION |
| This utility aims to show current values for User Beancounter in |
| a human-readable format. Values that are in pages are converted into bytes, |
| then long values are converted into kilo-, mega- gigabytes etc. |
| For held and maxheld, it shows how close the values are to the barrier and |
| to the limit. Zero and unlimited values are shown as \fB-\fR. |
| |
| One or several \fICTID\fRs can be specified to limit the output to the given |
| containers. Each \fICTID\fR can be either a name or a numeric ID. Note that |
| names can only be used if there is a container on the system with that name |
| (\fBvzlist -o ctid\fI name\fR command is used for name to ID conversion). |
| Unknown CTIDs are ignored. |
| |
| The utility can also be used from inside the container, in this case it only |
| shows the values for that container (and it doesn't make sense to specify |
| \fBCTID\fR). |
| .SH OPTIONS |
| .TP |
| .BR -w , \ --watch |
| Watch mode: run itself under \fBwatch\fR(1), redisplaying the output |
| every 2 seconds (by default) until interrupted by Ctrl-C. |
| .TP |
| .B -wd |
| Make \fBwatch\fR highlight the differences between current and previous |
| output (corresponds to \fBwatch -d\fR option). |
| .TP |
| .BI -wn \ time |
| Refresh interval for \fBwatch\fR(8), in seconds (corresponds to \fBwatch -n \fItime\fR). |
| .TP |
| .BR -q , \ --quiet |
| Quiet mode. In this mode, \fBvzubc\fR only shows beancounters with fails and |
| those with held/maxheld values close to limits. |
| .TP |
| .BI -qh \ ratio |
| Quiet threshold for held to limit ratio. Default is \fB0.5\fR (50%). |
| .TP |
| .BI -qm \ ratio |
| Quiet threshold for maxheld to limit ratio. Default is \fB0.8\fR (80%). |
| .TP |
| .BR -r , \ --relative |
| Relative mode: for fail counters, instead of showing the absolute value, |
| calculate the difference from the previous run. This mode is denoted by |
| a \fB+\fR sign before the \fBFAIL\fR column header. |
| .TP |
| .BI -rd \ dir |
| Set a directory for saving fail counters to \fIdir\fR (default is |
| \fB/tmp/vzubc.store\fR). |
| .TP |
| .B -rc |
| Clear all saved fail counter data. |
| .TP |
| .BR -i , \ --incremental |
| Incremental mode. Shows an additional column with a difference in held |
| value from the previous run. This option also affects quiet mode: all |
| lines with changed held values are shown. Held data is saved to the same |
| directory as fail counter data. |
| .TP |
| .BI -id \ dir |
| A synonym for \fB-rd\fR. |
| .TP |
| .B -ic |
| Clear all saved held data. |
| .TP |
| .BR -c , \ --color |
| Enable color highlighting. Not compatible with \fB--watch\fR. Same thresholds |
| as for quiet mode are used to highlight "more important" lines, plus the |
| lines with non-zero fail counters are highlighted. |
| .TP |
| \fB-f\fR | \fB--file\fR \fIfilename\fR |
| Read User Beancounters from \fIfilename\fR. By default this is |
| \fB/proc/bc/resources\fR or, if that one is not available, |
| \fB/proc/user_beancounters\fR. Use \fB-\fR to read from standard input. |
| .SH EXAMPLES |
| .TP |
| \fBvzubc 101 web dns\fR |
| Show all beancounters for CTID 101 and for CTs named \fBweb\fR and \fBdns\fR. |
| .TP |
| \fBvzubc -w -wd -wn 10 101\fR |
| Display beancounters for CT 101 every 10 seconds, highlighting the changes. |
| Interrupt with Control-C. |
| .TP |
| \fBvzubc -q -c\fR |
| Show beancounters with held or maxheld close to limits, plus those with |
| non-zero fail counters, with colors. |
| .TP |
| \fBvzubc -q -qh 0.8 -qm 1\fR |
| Show beancounters with held value equal to or more than 80% of a limit, |
| and/or with maxheld value equal or more than a limit, plus those with |
| non-zero fail counters. |
| .TP |
| \fBvzubc -w -q -r\fR |
| Display beancounters with held and maxheld close to limits, plus those with |
| increasing fail counters. |
| .TP |
| \fBvzubc -r -q -qh 2 -qm 2\fR |
| Only show beancounters with increased (since the last run) fail counters. |
| .TP |
| \fBvzubc -rc -ic\fR |
| Show all beancounters, and clear all saved data for relative and incremental |
| mode (i.e. saved values for fail counter and held). |
| .SH FILES |
| .ad l |
| \fB\f(CR/proc/bc/resources |
| .br |
| /proc/user_beancounters |
| .br |
| /tmp/vzubc.store/ubc.*\fR |
| .SH SEE ALSO |
| .BR watch (1), |
| .BR vzlist (8), |
| .BR vzmemcheck (8), |
| .BR vzcfgvalidate (8), |
| .BR http://wiki.openvz.org/UBC . |
| .SH LICENSE |
| Copyright (C) 2011, Parallels, Inc. Licensed under GNU GPL. |