Difference between revisions of "Man/vzubc.8"

From OpenVZ Virtuozzo Containers Wiki
< Man
Jump to: navigation, search
(beta version of man2wiki man page (work in progress!))
 
(Automated import of articles *** existing text overwritten ***)
 
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
<p style="margin-left:11%; margin-top: 1em">vzubc &minus;
 
<p style="margin-left:11%; margin-top: 1em">vzubc &minus;
show User Beancounters in a human-readable format.</p>
+
show User Beancounters in a human-readable format</p>
  
 
== SYNOPSIS ==
 
== SYNOPSIS ==
Line 25: Line 25:
 
container on the system with that name (<b>vzlist -o
 
container on the system with that name (<b>vzlist -o
 
ctid</b> <i>name</i> command is used for name to ID
 
ctid</b> <i>name</i> command is used for name to ID
conversion). Unknown CTIDs are ignored.</p>
+
conversion). Unknown <i>CTID</i>s are ignored.</p>
  
 
<p style="margin-left:11%; margin-top: 1em">The utility can
 
<p style="margin-left:11%; margin-top: 1em">The utility can
 
also be used from inside the container, in this case it only
 
also be used from inside the container, in this case it only
 
shows the values for that container (and it doesn&rsquo;t
 
shows the values for that container (and it doesn&rsquo;t
make sense to specify <b>CTID</b>).</p>
+
make sense to specify <i>CTID</i> argument).</p>
  
 
== OPTIONS ==
 
== OPTIONS ==
Line 50: Line 50:
 
<td width="78%">
 
<td width="78%">
  
<p>Make <b>watch</b> highlight the differences between
+
<p>Make <b>watch</b>(1) highlight the differences between
current and previous output (corresponds to <b>watch -d</b>
+
current and previous output. Corresponds to <b>watch -d</b>
option).</p> </td></tr>
+
option.</p> </td></tr>
 +
<tr valign="top" align="left">
 +
<td width="11%"></td>
 +
<td width="4%">
 +
 
 +
<p><b>-wt</b></p></td>
 +
<td width="7%"></td>
 +
<td width="78%">
 +
 
 +
<p>Instruct <b>watch</b>(1) to not show its title
 +
(interval, command, and current time at the top of the
 +
display, as well as the following blank line). Corresponds
 +
to <b>watch -t</b> option.</p></td></tr>
 
</table>
 
</table>
  
Line 58: Line 70:
  
 
<p style="margin-left:22%;">Refresh interval for
 
<p style="margin-left:22%;">Refresh interval for
<b>watch</b>(8), in seconds (corresponds to <b>watch -n</b>
+
<b>watch</b>(1), in seconds (corresponds to <b>watch -n</b>
 
<i>time</i>).</p>
 
<i>time</i>).</p>
  
Line 65: Line 77:
 
<p style="margin-left:22%;">Quiet mode. In this mode,
 
<p style="margin-left:22%;">Quiet mode. In this mode,
 
<b>vzubc</b> only shows beancounters with fails and those
 
<b>vzubc</b> only shows beancounters with fails and those
with held/maxheld values close to limits.</p>
+
with held/maxheld values close to limits.
 +
<b>-v</b>,&nbsp;<b>--verbose</b> Verbose mode. In this mode,
 +
<b>vzubc</b> also shows beancounters with barrier set to
 +
<b>unlimited</b> (those are hidden by default).</p>
  
 
<p style="margin-left:11%;"><b>-qh&nbsp;</b><i>ratio</i></p>
 
<p style="margin-left:11%;"><b>-qh&nbsp;</b><i>ratio</i></p>
Line 155: Line 170:
  
 
<p style="margin-left:22%;">Show all beancounters for CTID
 
<p style="margin-left:22%;">Show all beancounters for CTID
101 and for CTs named <b>web</b> and dns.</p>
+
101 and for CTs named <b>web</b> and <b>dns</b>.</p>
  
 
<p style="margin-left:11%;"><b>vzubc -w -wd -wn 10
 
<p style="margin-left:11%;"><b>vzubc -w -wd -wn 10
Line 198: Line 213:
 
== FILES ==
 
== FILES ==
  
<p style="margin-left:11%; margin-top: 1em">/proc/bc/resources
+
<pre style="margin-left:11%; margin-top: 1em">/proc/bc/resources
<br>
+
/proc/user_beancounters
/proc/user_beancounters <br>
+
/tmp/vzubc.store/ubc.*</pre>
/tmp/vzubc.store/ubc.*</p>
+
 
 +
== EXIT STATUS ==
 +
 
 +
<p style="margin-left:11%; margin-top: 1em">Returns 0 upon
 +
successful execution, 1 otherwise.</p>
  
 
== SEE ALSO ==
 
== SEE ALSO ==

Latest revision as of 01:44, 30 October 2013

NAME[edit]

vzubc − show User Beancounters in a human-readable format

SYNOPSIS[edit]

vzubc [option ...] [CTID ...]

DESCRIPTION[edit]

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

One or several CTIDs can be specified to limit the output to the given containers. Each CTID 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 (vzlist -o ctid name 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 CTID argument).

OPTIONS[edit]

-w--watch

Watch mode: run itself under watch(1), redisplaying the output every 2 seconds (by default) until interrupted by Ctrl-C.

-wd

Make watch(1) highlight the differences between current and previous output. Corresponds to watch -d option.

-wt

Instruct watch(1) to not show its title (interval, command, and current time at the top of the display, as well as the following blank line). Corresponds to watch -t option.

-wn time

Refresh interval for watch(1), in seconds (corresponds to watch -n time).

-q--quiet

Quiet mode. In this mode, vzubc only shows beancounters with fails and those with held/maxheld values close to limits. -v--verbose Verbose mode. In this mode, vzubc also shows beancounters with barrier set to unlimited (those are hidden by default).

-qh ratio

Quiet threshold for held to limit ratio. Default is 0.5 (50%).

-qm ratio

Quiet threshold for maxheld to limit ratio. Default is 0.8 (80%).

-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 + sign before the FAIL column header.

-rd dir

Set a directory for saving fail counters to dir (default is /tmp/vzubc.store).

-rc

Clear all saved fail counter data.

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

-id dir

A synonym for -rd.

-ic

Clear all saved held data.

-c--color

Enable color highlighting. Not compatible with --watch. Same thresholds as for quiet mode are used to highlight "more important" lines, plus the lines with non-zero fail counters are highlighted.

-f | --file filename

Read User Beancounters from filename. By default this is /proc/bc/resources or, if that one is not available, /proc/user_beancounters. Use - to read from standard input.

EXAMPLES[edit]

vzubc 101 web dns

Show all beancounters for CTID 101 and for CTs named web and dns.

vzubc -w -wd -wn 10 101

Display beancounters for CT 101 every 10 seconds, highlighting the changes. Interrupt with Control-C.

vzubc -q -c

Show beancounters with held or maxheld close to limits, plus those with non-zero fail counters, with colors.

vzubc -q -qh 0.8 -qm 1

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.

vzubc -w -q -r

Display beancounters with held and maxheld close to limits, plus those with increasing fail counters.

vzubc -r -q -qh 2 -qm 2

Only show beancounters with increased (since the last run) fail counters.

vzubc -rc -ic

Show all beancounters, and clear all saved data for relative and incremental mode (i.e. saved values for fail counter and held).

FILES[edit]

/proc/bc/resources
/proc/user_beancounters
/tmp/vzubc.store/ubc.*

EXIT STATUS[edit]

Returns 0 upon successful execution, 1 otherwise.

SEE ALSO[edit]

watch(1), vzlist(8), vzmemcheck(8), vzcfgvalidate(8), UBC.

LICENSE[edit]

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