[Lxc-users] Gathering information about containers - from inside and from outside

Clemens Perz cperz at gmx.net
Sun Jul 18 09:48:59 UTC 2010


Hi,

I was just searching my system for any status information about my
running containers, cause I want to start writing a script that collects
and displays this.

So doing a while on /var/lib/lxc as a starting point, run lxc-info on
each, find out which one is running, examine its cgroup and so on.

I have three macvlan containers running, but funny enough lsmod shows
that the macvlan module is not used. I cant find any entries in proc or
sys that would tell me anything about the existance of the network
interfaces for the containers. Can I find them at all? Could lxc-info be
extended to be verbose and tell you more in a parseable way?

I have adapted a similar thing I wrote for vserver and this is how it
might look like:

Container   Boot    Status  M-PID   IP              Load
--------------------------------------------------------------------
CVS01       AUTO    UP      40003   10.100.100.11   0.00  0.00  0.00
MAILE       man     down    --      10.100.100.12   --
CVS02       AUTO    UP      105     10.100.100.13   0.00  0.00  0.00

Guess the load might be an idea for the future :)

Cheers,
Clemens




More information about the lxc-users mailing list