How to monitor LXC CPU usage ?

ca_maer

Well-Known Member
Dec 5, 2017
181
14
58
45
How would I go about monitoring the CPU usage for an LXC container ? Solutions like in Nagios reads /proc but since the CPU are shared we get a lot of false positive.

Example:
CT A has 4 cores and uses 2 at 100% - 50% total CPU usage
CT B has 2 cores which are shared with CT A - 100% CPU usage (false reading since this CT does nothing)

Thanks
 
Are you looking at running something on each VM, or happy with something running on the node?

If so then on the node you can make use of the built in LXC tools such as lxc-info
 
Are you looking at running something on each VM, or happy with something running on the node?

If so then on the node you can make use of the built in LXC tools such as lxc-info

I'm open to both. I've look into lxc-info or lxc-top but it gives CPU use in seconds and not %. I'm not sure how I could convert it.