How to get RAM, CPU, network usage on a specific process on a container

I am looking at a number of Docker containers running on a Centos7 VM. Each container will be running a number of processes. For each process, I want to be able to see the CPU network and RAM usage to identify when the container is starting to get overloaded. Getting the CPU and RAM of the container is not going to be enough, as the CPU could have 100% of RAM allocated but in the processes there is actually RAM to spare. I have used Sysdig chisels to get the CPU usage of separate processes, but network and RAM use is not incorporated. Specifically for network statistics I want to be able to know network packets dropped any other relevant statistics. Ideally, I would be able to use a Sysdig-like tool to retrieve the stats from the host, instead of having to use resources inside the container to run a separate log generator.

  • Saving docker credentials in docker config
  • Remote debugging node app in Docker
  • Orion sending error message “connection failed, after 100 retries”
  • Run a docker service on a swarm having several system architectures
  • Can Google Kubernetes run Apache Mesos frameworks on top of it?
  • docker registry v2 ui with docker_auth
  • Is it possible to deploy a docker hub publicly hosted image to Kubernetes Container Engine without uploading it to Containers Registery?
  • Does Docker support restarting containers every X seconds
  • Running python program on docker
  • How can i execute commands inside containers during host provision
  • Escaping Docker attach one started from bash script
  • What docker image use for ionic CD / e2e testing? Ubuntu or just node?
  • One Solution collect form web for “How to get RAM, CPU, network usage on a specific process on a container”

    I believe you can use docker top <container id> to view all the processes running in a container but this will not show you the memory and cpu usage etc.

    You can, as suggested in the comments view the total memory usage, cpu usage, i/o etc of a entire container using docker stats <container id>.

    Alternatively you can log into your container and just have a look yourself by using docker exec -it <container id> bash but note, you may not have bash available depending on your base so you may have to use sh.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.