I am using Docker to run some containerized apps. I am interested in measuring how much resources they consume (as far as regarding CPU and Memory usage).
Is there any way to measure the resources consumed by Docker containers like RAM & CPU usage?
Thank you.
docker ps | awk '{print $1}' | grep -v CONTAINER
; do docker ps | grep $line | awk '{printf $NF" "}' && echo $((cat /sys/fs/cgroup/memory/docker/$line*/memory.usage_in_bytes
/ 1024 / 1024 ))MB ; done – Vagabond