lxc-monitor(1)
π lxc-monitor β monitor the container state π
okay so real talk, bestie: lxc-monitor(1) is the little tool that just... watches. it sits there and tells you what your containers are doing. main character energy, honestly.
β¨ SYNOPSIS β¨
lxc-monitor [-n name] [-Q name]
π¦ DESCRIPTION π¦
lxc-monitor monitors the state of containers. that's the whole vibe.
the name argument is how you tell it which containers to keep an eye on β and here's the slay part: it's a regular expression, conforming with posix2. so you can monitor all the containers, several of them, or just one. your choice, you're the main character π.
if you don't specify name, it defaults to .* β which monitors all containers in lxcpath. no cap, that's the default.
and the -P, --lxcpath=PATH option can be specified multiple times to monitor more than one container path. cute! but lowkey note this: containers with the same name in multiple paths will be indistinguishable in the output. so... don't do that to yourself π.
π OPTIONS π
-Q,--quitβ asks thelxc-monitorddaemon on each given lxcpath to quit. after it receives this command,lxc-monitordwill exit immediately as soon as it has no clients, instead of waiting the normal 30 seconds for new clients. super useful if you need to unmount the filesystem lxcpath is on. π₯
π COMMON OPTIONS π
these bad boys are common to most of the lxc commands. iykyk.
-?,-h,--helpβ prints a longer usage message than normal. (yes, longer. treat yourself.)--usageβ gives the usage message.-q,--quietβ mute on π-P,--lxcpath=PATHβ use an alternate container path. the default is/var/lib/lxc.-o,--logfile=FILEβ output to an alternate log FILE. the default is no log.-l,--logpriority=LEVELβ set log priority to LEVEL. the default log priority isERROR. possible values are:FATAL,ALERT,CRIT,WARN,ERROR,NOTICE,INFO,DEBUG,TRACE.
heads up bestie: this option is setting the priority of the events log in the alternate log file. it does not have an effect on theERRORevents log onstderr. two different things, don't get it twisted π
-n,--name=NAMEβ use container identifier NAME. the container identifier format is an alphanumeric string.--rcfile=FILEβ specify the configuration file to configure the virtualization and isolation functionalities for the container.
ngl this one's got a quirk: this configuration file, if present, will be used even if there is already a configuration file present in the previously created container (via lxc-create). she's assertive like that.
--versionβ show the version number. β
π«Ά EXAMPLES π«Ά
okay, examples time, this is where it gets fun π
lxc-monitor -n fooβ will monitor the different states for containerfoo.lxc-monitor -n 'foo|bar'β will monitor the different states for containerfooandbar.lxc-monitor -n '[fb].*'β will monitor the different states for container with the name beginning with letterforb.lxc-monitor -n '.*'β will monitor the different states for all containers. the full send π
π DIAGNOSTIC π
- The container was not found β the specified container was not created before with the
lxc-createcommand. yeah. she's not there. you gotta create her first, bestie.
πΈ SEE ALSO πΈ
π SEE ALSO (the extended universe) π
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, and it's from 2026-05-01, brought to you by the lxc-monitor(1) manual. go forth and monitor, you gorgeous thing πβ¨
π¦ 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