"Wrong" CPU usage shown in (h)top on lxc containers

limone

Well-Known Member
Aug 1, 2017
89
9
48
30
Hi,

lxc containers only show cpu usage of the host node, not the cpu usage of the container itself.
is there any way to fix this or is this not possible due to the way it is virtualized?

also in some containers (i noticed it in debian stretch) the ram usage is also shown wrong, well, kind of.
free -m shows that i use 80MB of RAM and 270MB are shared.
But in htop it adds used and shared ram, so it shows i use 350MB.
Again, is it possible to fix this or not? In debian 8 container there is no such problem, htop shows the correct data, at least for the ram, cpu usage is always the hosts cpu usage.
In openvz virtualization this problems did not appear..
 
what would CPU usage of the container be? a container does not get its own CPU..
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!