My observation:
When i stress a container incus exec cnt0 – stress-ng --cpu 4 --timeout 120. and check CPU Affinity inside the container, using the command i get the below output, incus exec cnt0 – bash -c ‘for pid in $(pgrep stress-ng); do taskset -cp $pid; done’
pid 1988’s current affinity list: 0-3
pid 1989’s current affinity list: 0-3
pid 1990’s current affinity list: 0-3
pid 1991’s current affinity list: 0-3
It means stress is distributed among the CPU but when i expose metrics, only CPU 0 metrics is visible. Please find below the output incus_cpu_seconds_total{cpu=“0”,mode=“system”,name=“cnt0”,project=“default”,type=“container”} 1202.286404
incus_cpu_seconds_total{cpu=“0”,mode=“user”,name=“cnt0”,project=“default”,type=“container”} 1217.502465
it just shows cpu=“0” details ! What can i do to see all the CPU metrics, when i get the metrics exposed by incus ?