Different OS the namespace/cgroup path is slightly different.
Ubuntu
As for Ubuntu, CPU cgroup for example is from:
1 | # if you run docker container |
then you will see folder named as docker container ID, for example:
1 | cd 9a89252ea39e15c5f90cc7b1a606bc64d4acb3a50c112ab53f3e751d06ba85db |
For other cgroups, following the similiar path pattern, for example, the memory path is /sys/fs/cgroup/memory/docker
.
GKE
In Google GKE node, the CPU cgroup path is like:
1 | # burstable is a type of QoS (quality of service) |
The 84b07d37a9f07c57fe9e642f2cd951f7821b5d2333c92eae945b99f5dd996491
is container ID inside of the pod. Using kubectl describe
can see it, then you can see the cpu limit/request source of truth.