Debian 12 bookworm
Sponsored Link

Podman : Display Container resource usage2023/06/21

 
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:~#
podman stats

ID            NAME                   CPU %       MEM USAGE / LIMIT  MEM %       NET IO          BLOCK IO           PIDS        CPU TIME    AVG CPU %
72738df86ecd  priceless_nightingale  0.00%       0B / 0B            0.00%       0B / 0B         0B / 0B            0           0s          0.00%
7cc07ee2f437  upbeat_kilby           0.10%       4.813MB / 16.77GB  0.03%       586B / 656B     11.26MB / 4.096kB  9           12.238ms    0.10%
bc45ab289b96  focused_sammet         0.00%       0B / 0B            0.00%       0B / 0B         0B / 0B            0           0s          0.00%
cbc0fa585f1b  strange_varahamihira   0.00%       0B / 0B            0.00%       0B / 0B         0B / 0B            0           0s          0.00%
d5d89f4e6596  zealous_nobel          0.14%       15.25MB / 16.77GB  0.09%       656B / 2.086kB  15.57MB / 8.192kB  56          36.817ms    0.14%
e33db7f8c043  debian-nginx           0.00%       0B / 0B            0.00%       0B / 0B         0B / 0B            0           0s          0.00%
ec2ab97e352a  adoring_kalam          0.00%       0B / 0B            0.00%       0B / 0B         0B / 0B            0           0s          0.00%
fd506a88790a  festive_clarke         0.00%       0B / 0B            0.00%       0B / 0B         0B / 0B            0           0s          0.00%

# display without streaming

root@dlp:~#
podman stats --no-stream

ID            NAME                   CPU %       MEM USAGE / LIMIT  MEM %       NET IO          BLOCK IO           PIDS        CPU TIME    AVG CPU %
72738df86ecd  priceless_nightingale  0.00%       0B / 0B            0.00%       0B / 0B         0B / 0B            0           0s          0.00%
7cc07ee2f437  upbeat_kilby           0.01%       4.813MB / 16.77GB  0.03%       866B / 1.356kB  11.26MB / 4.096kB  9           12.238ms    0.01%
bc45ab289b96  focused_sammet         0.00%       0B / 0B            0.00%       0B / 0B         0B / 0B            0           0s          0.00%
cbc0fa585f1b  strange_varahamihira   0.00%       0B / 0B            0.00%       0B / 0B         0B / 0B            0           0s          0.00%
d5d89f4e6596  zealous_nobel          0.02%       15.25MB / 16.77GB  0.09%       866B / 2.786kB  15.57MB / 8.192kB  56          39.762ms    0.02%
e33db7f8c043  debian-nginx           0.00%       0B / 0B            0.00%       0B / 0B         0B / 0B            0           0s          0.00%
ec2ab97e352a  adoring_kalam          0.00%       0B / 0B            0.00%       0B / 0B         0B / 0B            0           0s          0.00%
fd506a88790a  festive_clarke         0.00%       0B / 0B            0.00%       0B / 0B         0B / 0B            0           0s          0.00%

# display for a specific container

root@dlp:~#
podman stats 7cc07ee2f437 --no-stream

ID            NAME          CPU %       MEM USAGE / LIMIT  MEM %       NET IO          BLOCK IO           PIDS        CPU TIME    AVG CPU %
7cc07ee2f437  upbeat_kilby  0.00%       4.813MB / 16.77GB  0.03%       936B / 1.566kB  11.26MB / 4.096kB  9           12.238ms    0.00%

# specify time interval for streaming display (sec)
# * default --interval is 5 sec

root@dlp:~#
podman stats 7cc07ee2f437 --interval 10

ID            NAME          CPU %       MEM USAGE / LIMIT  MEM %       NET IO             BLOCK IO           PIDS        CPU TIME    AVG CPU %
7cc07ee2f437  upbeat_kilby  0.00%       4.813MB / 16.77GB  0.03%       1.006kB / 1.776kB  11.26MB / 4.096kB  9           12.238ms    0.00%

# display with specific format

root@dlp:~#
podman stats --no-stream --format "table {{.ID}} {{.CPUPerc}} {{.MemPerc}}"

ID            CPU %       MEM %
72738df86ecd  0.00%       0.00%
7cc07ee2f437  0.00%       0.03%
bc45ab289b96  0.00%       0.00%
cbc0fa585f1b  0.00%       0.00%
d5d89f4e6596  0.00%       0.09%
e33db7f8c043  0.00%       0.00%
ec2ab97e352a  0.00%       0.00%
fd506a88790a  0.00%       0.00%
Matched Content