Open cjds opened 4 years ago
Why you need to monitor REAL hardware parameters from pseudo virtualization? it s normal kernel to kicks such nonreglamented remote access
The reason I am using Docker is to package my code without easily without affecting the host system. However, the Docker being deployed has
--privileged --cap-add ALL
which does let me monitor devices and interact with kernel modules.
Because the Docker has programs that interact with devices on the USB bus I would like to monitor the CPU usage? Is that so unreasonable?
This isn't unheard of practice? What do you mean by remote access? It's on the same host?
You want to act as some virus over kernel. Docker is a pseudo virtualisation with mean act as separate system in system.
While that is true it also can access real devices on the system. Even virtualization can need to know the USB Bus bandwidth if it is accessing data on the USB bus and interacting with devices on it.
I am also interested in learning how to run usbtop from docker. So far I have this Dockerfile:
FROM ubuntu:22.04
RUN apt update
RUN apt install usbtop -y
RUN apt install kmod -y
RUN usbtop
But I get the error: "No USB bus can be captured thanks to libpcap. Check your name filter and make sure relevent permissions are set !"
If I try to run modprobe like this:
FROM ubuntu:22.04
RUN apt update
RUN apt install usbtop -y
RUN apt install kmod -y
RUN modprobe usbmon
RUN usbmon
Then I get the error: "modprobe: FATAL: Module usbmon not found in directory /lib/modules/5.14.0-1038-oem"
You should run sudo modprobe usbmon
on your host before executing your docker run ..
I'm trying to run
usbtop
in a priveleged Docker.It keeps saying
However, I have run
outside the docker
When I run
So the Docker can detect the module. What's going on?