Open grubbyhou opened 7 years ago
Shouldn't be a problem as long as the OS you're running inside your container is supported by Sigar.
I have try again ,sigar can not collect data ,such as cpu usage ,mem status from docker container ,but the data set collected are belong to the machine holds the docker.
is there any way to solve this problem ? any advice is welcome!
@hiergiltdiestfu there isnt any stain encontered when run sigar on docker, but it collect the data set is not from docker's but is from holder's, i need collect the information from docker
If I recall correctly, Docker isn't pulling up a true VM, but shepherds all its containers' contents on the host machine. So there is no virtual machine involved which could be interrogated, everything runs on the host, even if in the isolation of a container..
This appears to be a slightly separate problem from the original question?
@hiergiltdiestfu Thanks for your explaination,Ive got it, I wanna kown how to calculate the cpu,mem,net applications on the docker consume, do u have any other solutions?
Check out the cli tools docker brings along: https://docs.docker.com/engine/reference/commandline/stats/ -- you'll need some kind of script in the host context. This is outside Sigar's scope tho.
@hiergiltdiestfu OK, Thanks alot ,I ve find one way to solve, just like you provided.
I nead to run java program in docker @AlexYaruki