Changes

Jump to: navigation, search

Man/vzubc.8

6,733 bytes added, 21:22, 29 May 2011
beta version of man2wiki man page (work in progress!)
== NAME ==

<p style="margin-left:11%; margin-top: 1em">vzubc &minus;
show User Beancounters in a human-readable format.</p>

== SYNOPSIS ==

<p style="margin-left:11%; margin-top: 1em">vzubc
[<i>option</i> ...] [<i>CTID</i> ...]</p>

== DESCRIPTION ==

<p style="margin-left:11%; margin-top: 1em">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 <b>-</b>.</p>

<p style="margin-left:11%; margin-top: 1em">One or several
<i>CTID</i>s can be specified to limit the output to the
given containers. Each <i>CTID</i> 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 (<b>vzlist -o
ctid</b> <i>name</i> command is used for name to ID
conversion). Unknown CTIDs are ignored.</p>

<p style="margin-left:11%; margin-top: 1em">The utility can
also be used from inside the container, in this case it only
shows the values for that container (and it doesn&rsquo;t
make sense to specify <b>CTID</b>).</p>

== OPTIONS ==

<p style="margin-left:11%; margin-top: 1em"><b>-w</b>,&nbsp;<b>--watch</b></p>

<p style="margin-left:22%;">Watch mode: run itself under
<b>watch</b>(1), redisplaying the output every 2 seconds (by
default) until interrupted by Ctrl-C.</p>

<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">

<p><b>-wd</b></p></td>
<td width="7%"></td>
<td width="78%">

<p>Make <b>watch</b> highlight the differences between
current and previous output (corresponds to <b>watch -d</b>
option).</p> </td></tr>
</table>

<p style="margin-left:11%;"><b>-wn&nbsp;</b><i>time</i></p>

<p style="margin-left:22%;">Refresh interval for
<b>watch</b>(8), in seconds (corresponds to <b>watch -n</b>
<i>time</i>).</p>

<p style="margin-left:11%;"><b>-q</b>,&nbsp;<b>--quiet</b></p>

<p style="margin-left:22%;">Quiet mode. In this mode,
<b>vzubc</b> only shows beancounters with fails and those
with held/maxheld values close to limits.</p>

<p style="margin-left:11%;"><b>-qh&nbsp;</b><i>ratio</i></p>

<p style="margin-left:22%;">Quiet threshold for held to
limit ratio. Default is <b>0.5</b> (50%).</p>

<p style="margin-left:11%;"><b>-qm&nbsp;</b><i>ratio</i></p>

<p style="margin-left:22%;">Quiet threshold for maxheld to
limit ratio. Default is <b>0.8</b> (80%).</p>

<p style="margin-left:11%;"><b>-r</b>,&nbsp;<b>--relative</b></p>

<p style="margin-left:22%;">Relative mode: for fail
counters, instead of showing the absolute value, calculate
the difference from the previous run. This mode is denoted
by a <b>+</b> sign before the <b>FAIL</b> column header.</p>

<p style="margin-left:11%;"><b>-rd&nbsp;</b><i>dir</i></p>

<p style="margin-left:22%;">Set a directory for saving fail
counters to <i>dir</i> (default is
<b>/tmp/vzubc.store</b>).</p>

<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">

<p><b>-rc</b></p></td>
<td width="7%"></td>
<td width="52%">

<p>Clear all saved fail counter data.</p></td>
<td width="26%">
</td></tr>
</table>

<p style="margin-left:11%;"><b>-i</b>,&nbsp;<b>--incremental</b></p>

<p style="margin-left:22%;">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.</p>

<p style="margin-left:11%;"><b>-id&nbsp;</b><i>dir</i></p>

<p style="margin-left:22%;">A synonym for <b>-rd</b>.</p>

<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">

<p><b>-ic</b></p></td>
<td width="7%"></td>
<td width="40%">

<p>Clear all saved held data.</p></td>
<td width="38%">
</td></tr>
</table>

<p style="margin-left:11%;"><b>-c</b>,&nbsp;<b>--color</b></p>

<p style="margin-left:22%;">Enable color highlighting. Not
compatible with <b>--watch</b>. Same thresholds as for quiet
mode are used to highlight &quot;more important&quot; lines,
plus the lines with non-zero fail counters are
highlighted.</p>

<p style="margin-left:11%;"><b>-f</b> | <b>--file</b>
<i>filename</i></p>

<p style="margin-left:22%;">Read User Beancounters from
<i>filename</i>. By default this is
<b>/proc/bc/resources</b> or, if that one is not available,
<b>/proc/user_beancounters</b>. Use <b>-</b> to read from
standard input.</p>

== EXAMPLES ==

<p style="margin-left:11%; margin-top: 1em"><b>vzubc 101
web dns</b></p>

<p style="margin-left:22%;">Show all beancounters for CTID
101 and for CTs named <b>web</b> and dns.</p>

<p style="margin-left:11%;"><b>vzubc -w -wd -wn 10
101</b></p>

<p style="margin-left:22%;">Display beancounters for CT 101
every 10 seconds, highlighting the changes. Interrupt with
Control-C.</p>

<p style="margin-left:11%;"><b>vzubc -q -c</b></p>

<p style="margin-left:22%;">Show beancounters with held or
maxheld close to limits, plus those with non-zero fail
counters, with colors.</p>

<p style="margin-left:11%;"><b>vzubc -q -qh 0.8 -qm
1</b></p>

<p style="margin-left:22%;">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.</p>

<p style="margin-left:11%;"><b>vzubc -w -q -r</b></p>

<p style="margin-left:22%;">Display beancounters with held
and maxheld close to limits, plus those with increasing fail
counters.</p>

<p style="margin-left:11%;"><b>vzubc -r -q -qh 2 -qm
2</b></p>

<p style="margin-left:22%;">Only show beancounters with
increased (since the last run) fail counters.</p>

<p style="margin-left:11%;"><b>vzubc -rc -ic</b></p>

<p style="margin-left:22%;">Show all beancounters, and
clear all saved data for relative and incremental mode (i.e.
saved values for fail counter and held).</p>

== FILES ==

<p style="margin-left:11%; margin-top: 1em">/proc/bc/resources
<br>
/proc/user_beancounters <br>
/tmp/vzubc.store/ubc.*</p>

== SEE ALSO ==

<p style="margin-left:11%; margin-top: 1em"><b>watch</b>(1),
[[Man/vzlist.8|<b>vzlist</b>(8)]], [[Man/vzmemcheck.8|<b>vzmemcheck</b>(8)]],
[[Man/vzcfgvalidate.8|<b>vzcfgvalidate</b>(8)]],
<b>[[UBC]]</b>.</p>

== LICENSE ==

<p style="margin-left:11%; margin-top: 1em">Copyright (C)
2011, Parallels, Inc. Licensed under GNU GPL.</p>

Navigation menu