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 the lxc-monitord daemon on each given lxcpath to quit. after it receives this command, lxc-monitord will 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 is ERROR. 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 the ERROR events log on stderr. 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 container foo.
  • lxc-monitor -n 'foo|bar' β€” will monitor the different states for container foo and bar.
  • lxc-monitor -n '[fb].*' β€” will monitor the different states for container with the name beginning with letter f or b.
  • 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-create command. yeah. she's not there. you gotta create her first, bestie.

🌸 SEE ALSO 🌸

regex(7)


πŸ‘‘ 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