cAdvisor is failing to collect the data for processes running inside the container

I am using the cadvisor to collect the LXC container health data. Here, I am using the below command to run the cadvisor container:


sudo docker run --volume=/:/rootfs:ro --volume=/var/run:/var/run:ro --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --volume=/dev/disk/:/dev/disk:ro --publish=8080:8080 --detach=true --name=cadvisor google/cadvisor:latest


But, the issue is I am getting the CPU and memory related data but it is faillig to collect the state of the process running inside the LXC container.

For example:
I want to get the state of the process “p”, it is running inside the LXC container but cadvisor is not showing it as running.

ps output inside the container:

sh-4.4# ps ax | grep Audio
    105 ?        Ssl    0:00 Audio -d
    364 pts/0    S+     0:00 grep Audio

But, in cadvisor dashboard it is not showing as running state. It is giving “0” for the process which is running inside the container:

container_tasks_state{id="/lxc.payload.mycontainer/system.slice/Audio.service",image="",name="",state="running"} 0

Can anybody suggect me what wrong I am doing here please.

Siddhartha V

Hmm, I’d expect Docker to run inside a PID namespace which would hide anything from the parent.

Hello @stgraber,

Sorry I didn’t get your point in clear. May I know what should I do to resolve this issue please? kind request sir.

Docker containers can’t see processes outside of the Docker container, so what you’re doing just can’t work.

Oh ok thank you sir.