CentOS Stream 10

Docker : Display Container resource usage2025/08/08

 

You can check percentage of CPU, memory, network I/O for Containers.

[1] Check the resource usage of each container.
# display usage statistics with streaming

[root@dlp ~]#
docker stats

CONTAINER ID   NAME                 CPU %     MEM USAGE / LIMIT     MEM %     NET I/O         BLOCK I/O     PIDS
87fff5495b19   mystifying_wescoff   0.03%     13.75MiB / 15.36GiB   0.09%     656B / 126B     0B / 42.5kB   177
e203d6d11fdb   jovial_booth         0.00%     7.504MiB / 15.36GiB   0.05%     1.07kB / 126B   0B / 39.9kB   9

# display without streaming

[root@dlp ~]#
docker stats --no-stream

CONTAINER ID   NAME                 CPU %     MEM USAGE / LIMIT     MEM %     NET I/O         BLOCK I/O     PIDS
87fff5495b19   mystifying_wescoff   0.03%     13.75MiB / 15.36GiB   0.09%     726B / 126B     0B / 42.5kB   177
e203d6d11fdb   jovial_booth         0.00%     7.504MiB / 15.36GiB   0.05%     1.14kB / 126B   0B / 39.9kB   9

# display for a specific container

[root@dlp ~]#
docker stats e203d6d11fdb --no-stream

CONTAINER ID   NAME           CPU %     MEM USAGE / LIMIT     MEM %     NET I/O         BLOCK I/O     PIDS
e203d6d11fdb   jovial_booth   0.00%     7.504MiB / 15.36GiB   0.05%     1.14kB / 126B   0B / 39.9kB   9

# display with specific format

[root@dlp ~]#
docker stats --no-stream --format "table {{.ID}} {{.CPUPerc}} {{.MemPerc}}"

CONTAINER ID CPU % MEM %
87fff5495b19 0.03% 0.09%
e203d6d11fdb 0.00% 0.05%
Matched Content