runc container cpu usage

544 views Asked by At

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?

1

There are 1 answers

0
user13145713 On BEST ANSWER

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.