Ubuntu 24.04
Sponsored Link

Podman : Display Container resource usage2024/05/05

 
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 %
edbc10e1e1bc  112bab1edacf-service     0.00%       53.25kB / 16.77GB  0.00%       0B / 0B        0B / 0B     1           2.378ms     0.00%
7b0cc19b3568  2c33a8eca2bb-infra       0.00%       45.06kB / 16.77GB  0.00%       1.99kB / 936B  0B / 0B     1           2.294ms     0.00%
12debadbad63  nginx-pod-pod-nginx-pod  0.00%       4.743MB / 16.77GB  0.03%       1.99kB / 936B  0B / 0B     9           8.569ms     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 %
edbc10e1e1bc  112bab1edacf-service     0.00%       53.25kB / 16.77GB  0.00%       0B / 0B        0B / 0B     1           2.378ms     0.00%
7b0cc19b3568  2c33a8eca2bb-infra       0.00%       45.06kB / 16.77GB  0.00%       2.06kB / 936B  0B / 0B     1           2.294ms     0.00%
12debadbad63  nginx-pod-pod-nginx-pod  0.00%       4.743MB / 16.77GB  0.03%       2.06kB / 936B  0B / 0B     9           8.569ms     0.00%

# display for a specific container

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

ID            NAME                     CPU %       MEM USAGE / LIMIT  MEM %       NET IO         BLOCK IO    PIDS        CPU TIME    AVG CPU %
12debadbad63  nginx-pod-pod-nginx-pod  0.00%       4.743MB / 16.77GB  0.03%       2.06kB / 936B  0B / 0B     9           8.569ms     0.00%

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

root@dlp:~#
podman stats 12debadbad63 --interval 10

ID            NAME                     CPU %       MEM USAGE / LIMIT  MEM %       NET IO         BLOCK IO    PIDS        CPU TIME    AVG CPU %
12debadbad63  nginx-pod-pod-nginx-pod  0.00%       4.743MB / 16.77GB  0.03%       2.06kB / 936B  0B / 0B     9           8.569ms     0.00%

# display with specific format

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

ID            CPU %       MEM %
edbc10e1e1bc  0.00%       0.00%
7b0cc19b3568  0.00%       0.00%
12debadbad63  0.00%       0.03%
Matched Content