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,--delaydelay β how many seconds to wait between screen updates. The default is3seconds. β³-s,--sortsortby β sort the containers. The sortby argument should be one of the lettersn,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
- alpine 3.24: lxc-doc 7.0.0-r0 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms