lxc-top(1)

✨ lxc-top(1) β€” bestie's guide to watching your containers ✨

Okay so real talk, lxc-top is literally the group-chat lurker of the LXC world β€” it just sits there and watches all your containers do their thing. πŸ’– This page is lxc-top(1), and we're gonna get you fully fluent, no cap.


🌸 NAME 🌸

lxc-top β€” monitor container statistics πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

lxc-top [--help] [--delay delay] [--sort sortby] [--reverse]

πŸ’… DESCRIPTION πŸ’…

lxc-top displays container statistics. It's giving very much "live dashboard, but make it terminal." ✨

The output refreshes every delay seconds, and the containers are ordered according to the sortby value you gave it. lxc-top will show as many containers as can fit in your terminal β€” so if your terminal window is tiny, that's a vibe check on how many friends get to be on screen. 🫢

Press q to quit. Press one of the sort key letters to sort by that statistic. And here's the iconic part: press the same sort key letter a second time and it reverses the sort order. Chef's kiss. πŸ’…


πŸŽ€ OPTIONS πŸŽ€

  • -d, --delay delay β€” how many seconds to wait between screen updates. The default is 3 seconds. ⏳
  • -s, --sort sortby β€” sort the containers. The sortby argument should be one of the letters n, c, b, m, k β€” which sort by name, cpu use, block I/O, memory, or kernel memory use respectively. The default is 'n'. πŸ‘‘
  • -r, --reverse β€” reverse the default sort order. By default, names sort in ascending alphabetical order and values sort in descending amounts (ie. largest value first). πŸ”„

🌈 EXAMPLE 🌈

lxc-top --delay 1 --sort m

Display containers, updating every second, sorted by memory use. Literally that easy. πŸ“


🧚 NOTES 🧚

Heads up bestie, this one's important β€” it's a real caveat, not just vibes.

For performance reasons the kernel does not account kernel memory use unless a kernel memory limit is set. If a limit is not set, lxc-top will display kernel memory use as 0. And if no containers are being accounted, the KMem column will not be displayed at all. 😭

A limit can be set by specifying this in your container configuration file:

lxc.cgroup.memory.kmem.limit_in_bytes = number

See lxc.conf(5) for the deets. πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

lxc(7), lxc-create(1), lxc-copy(1), lxc-destroy(1), lxc-start(1), lxc-stop(1), lxc-execute(1), lxc-console(1), lxc-monitor(1), lxc-wait(1), lxc-cgroup(1), lxc-ls(1), lxc-info(1), lxc-freeze(1), lxc-unfreeze(1), lxc-attach(1), lxc.conf(5)


Mwah πŸ’‹ that's the whole page! This one's from the lxc-top(1) manual, dated 2026-05-01 β€” go forth and sort your containers, bestie, you're gonna slay. πŸ‘‘βœ¨

πŸ“¦ where this page comes from