0

Where to look for cpu usage for a specific runc container? . There is no file present in /proc/<cid>/ (<cid> is the pid obtained from runc list command) by any cpu related name which gives cpu usage for that specific container. In /sys/fs/cgroup there are files present under cpu, cpuacct, cpu,cpuacct directories. I don't see if there's any way to extract cpu usage form those files for a specific container.

Is there any way i can get this information?

4

1 回答 1

0

Got this, There are folders created by the name of the container which you are running under /sys/fs/cgroup/cpu,cpuacct/user.slice/<container_folder>/cpuacct.usage, cpuacct.usage gives information about the cpu time used by that container.

Note: Specifically talking about runc containers, don't know about others.

于 2020-09-29T05:38:24.450 回答