[lxc-users] Issue concerning total CPU usage in top (package procps)

Jäkel, Guido G.Jaekel at dnb.de
Thu Jan 10 08:26:26 UTC 2019


Dear all,

I'm using Gentoo for LXC host and containers. After upgrading the procps package from 3.3.12 to 3.3.15, in the top application the value of summed CPU usage inside a container is always 0 (zero).

* This issue shows up in the containers only, but not on the host
* If I switch the display to show the value for individual CPUs, it "works"
* This was not the case with the former used 3.3.12

A quick look at the source code of top show that it seems to use /proc/stat. Watching a 'head -1 /proc/stat' show changing values for the cpu line - no surprise since the v3.12 of top will work. The versions of the relevant component I'm currently using:

* Kernel 4.14.79-gentoo
* lxcfs-3.0

May somebody confirm this quirk using another Linux Distribution and/or LXC version?


Thank you in advance

Guido




More information about the lxc-users mailing list