1 year ago

#388510

test-img

Shai Fischer

can't get psutil .net_connections() work the same in container

Trying to create an containerized python app that collect host's process network data,

I've been using psutil to get the data, when using psutil.net_connection(kind='inet') Inside the docker container the PID value is always None,

I have used --pid=host and --network=host in the docker run command,

When I run the app out of a container it works but when trying it in the container it fails because of the None value,

Would love ideas

python-3.x

docker

microservices

psutil

0 Answers

Your Answer

Accepted video resources