vzlist(8)

πŸ“¦ version 4.9.4, in ubuntu jammy

πŸ’– vzlist(8) β€” Containers πŸ’–

okay bestie, welcome to vzlist, from the Containers section of the manual (section 8, iykyk) 🫢


✨ NAME ✨

vzlist β€” show various information about containers πŸ‘‘


🌸 SYNOPSIS 🌸

vzlist [-a | -S] [-n] [-H] [-t] [-j] [-o name[,name...]|-1] [-s [-]name]
       [-h pattern] [-N pattern] [-d pattern] [CTID [CTID ...]]
vzlist -L | --list
vzlist --help

πŸ¦‹ DESCRIPTION πŸ¦‹

So this lil utility is literally the one you use for listing containers and all their parameters. By default only running containers are listed. And if you pass one or more CTIDs? Then only the containers you asked for show up. No extras. Periodt. πŸ’…

Now listen, some fields can have long values β€” think ip, hostname, description or features β€” and those value strings get trimmed to some predefined width, because otherwise the whole columned layout would break and we can't have that 😭. UNLESS that field is the last one. So if you want the full, non-trimmed value for one of those fields, put the field name last in the list of fields for the -o option. And if you're running vzlist from a script, add -t to disable trimming entirely. πŸŽ€


πŸ’… OPTIONS πŸ’…

  • -a, --all β€” list all containers. every single one. πŸ’–
  • -S, --stopped β€” list only the containers that are not running (and yes, that includes the ones whose status shows as mounted or suspended). πŸ›‘
  • -n, --name β€” display container names instead of hostnames. a whole different vibe. ✨
  • -H, --no-header β€” suppress the header row. super usable for scripts. πŸ€–
  • -t, --no-trim β€” suppress trimming of long fields. also super usable for scripts. πŸ“œ
  • -j, --json β€” output in JSON format. by default, all possible fields are printed. 🧚
  • -o, --output field[,field...] β€” display only the fields you specify (peep the Possible fields subsection below, bestie). 🎯
  • -1 β€” synonym for -H -octid, meaning you only show container IDs, one per line. so clean. so minimal. 🌈
  • -s, --sort [-]field β€” sort by the value of field (the possible arguments are the same as for -o). the - before the field name means sort in reverse order. πŸ”„

πŸ” Output filters πŸ”

Your list of CTs can be filtered even further with the following options. For patterns, you can use the same wildcards as in shell (that's *, ?, and []). πŸ“

Note: to avoid expansion of wildcards by the shell, you have to escape the pattern by either putting it into single quotes (like 'a*a') or by adding a backslash before the wildcard character (like a\*a). do NOT skip this step, the shell will absolutely snatch your pattern otherwise πŸ’€
  • -h, --hostname pattern β€” list only containers whose hostnames match the pattern. 🏠
  • -N, --name_filter pattern β€” list only containers whose names match the pattern. πŸ“›
  • -d, --description pattern β€” list only containers with descriptions matching the pattern. πŸ“–

🌟 Possible fields 🌟

  • -L, --list β€” list all available format specifiers that can be used for both output (-o, --output) and the sorting order (-s, --sort). the whole menu, served fresh. πŸ“

For the user beancounter fields, if the suffix is not specified, the current usage (a.k.a. "held") value is shown. You can also use the following suffixes:

  • .m β€” maxheld
  • .b β€” barrier
  • .l β€” limit
  • .f β€” fail counter

For the disk quota fields, if the suffix is not specified, the current usage is shown. You can also use the following suffixes:

  • .s β€” soft limit
  • .h β€” hard limit
Note that for JSON output, suffixes are not allowed. just so you know. πŸ™ˆ

πŸŽ€ EXAMPLES πŸŽ€

vzlist -o ctid,kmemsize,kmemsize.l -s kmemsize

Show CTIDs, kmemsize usage, and kmemsize limit for all running containers, sorted by the kmemsize usage. literally the go-to move. πŸ”₯


⭐ EXIT STATUS ⭐

Returns 0 upon success. that's it, that's the whole status. ate and left no crumbs. πŸ‘‘


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


okay that's the whole page bestie, you're officially a vzlist girlie now πŸ§šπŸ’– this was the OpenVZ vzlist(8) page, dated 13 Jun 2012, and yes we're still obsessed with it. mwah πŸ’…βœ¨

πŸ“¦ where this page comes from