vzubc(8)

πŸ“¦ version 4.9.4, in ubuntu jammy

πŸ’– vzubc β€” ok bestie, let's talk User Beancounters πŸ’–

So like. vzubc(8) is a lil tool from the Containers section of the manual, and she is so good at what she does. She shows you your User Beancounters in a format that actual humans can read, instead of a wall of raw numbers. Obsessed, honestly. 🫢


✨ NAME ✨

vzubc β€” show User Beancounters in a human-readable format πŸŽ€


🌸 SYNOPSIS 🌸

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

πŸ’… DESCRIPTION πŸ’…

The whole point of this utility is to show you the current values for User Beancounters, but, like, in a way that doesn't make your eyes glaze over. Here's the glow-up it does:

  • Values that are in pages get converted into bytes πŸ’–
  • Then those long values get converted into kilo-, mega-, gigabytes etc. because nobody wants to count zeros at 3am
  • For held and maxheld, it shows you how close the values are to the barrier and to the limit
  • Zero and unlimited values are shown as - (as in, "don't worry about it, she's unbothered") ✨

You can also pass one or several CTIDs to limit the output to just those containers. Each CTID can be either a name or a numeric ID. But heads up bestie β€” names only work if there's actually a container on the system with that name. The conversion from name to ID is done with the vzlist -o ctid name command. Unknown CTIDs are just... ignored. Not a big deal. πŸ’€

Also! You can run this utility from inside the container too. In that case it only shows the values for that container β€” and it doesn't make sense to specify the CTID argument, so don't. πŸ™ˆ


πŸ”₯ OPTIONS πŸ”₯

  • -w, --watch β€” Watch mode, queen. Runs itself under watch(1), redisplaying the output every 2 seconds (by default) until you interrupt it with Ctrl-C. πŸ‘‘
  • -wd β€” Makes watch(1) highlight the differences between the current and previous output. Corresponds to the watch -d option. ✨
  • -wt β€” Tells watch(1) to not show its title (that's the interval, command, and current time at the top of the display, plus the blank line that follows it). Corresponds to the 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 the held to limit ratio. Default is 0.5 (50%). 🌸
  • -qm ratio β€” Quiet threshold for the maxheld to limit ratio. Default is 0.8 (80%). 🌸
  • -r, --relative β€” Relative mode: for fail counters, instead of showing the absolute value, it calculates 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 the 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. Same thing, different name, slay. πŸ’…
  • -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 🌟

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 πŸ“

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

🚦 EXIT STATUS 🚦

Returns 0 upon successful execution, 1 otherwise. Simple as that, bestie. πŸ’–


πŸ‘€ SEE ALSO πŸ‘€

watch(1), vzlist(8), vzmemcheck(8), vzcfgvalidate(8), http://wiki.openvz.org/UBC.


πŸ“œ LICENSE πŸ“œ

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


ok that's the whole page, you ate that fr fr πŸ’…

And that's a wrap! This page came to you from OpenVZ, dated 2 May 2013 β€” vzubc(8), forever iconic, no cap. πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from