Podman : Display Container resource usage2024/11/06 |
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 % ba07824a4ab6 25584df418d3-service 0.06% 53.25kB / 16.76GB 0.00% 0B / 0B 0B / 0B 1 3.407ms 0.06% b45b0a87c601 81e1b69c244d-infra 0.06% 53.25kB / 16.76GB 0.00% 1.706kB / 628B 0B / 0B 1 3.124ms 0.06% 3d61c65066dc nginx-pod-pod-nginx-pod 0.39% 6.644MB / 16.76GB 0.04% 1.706kB / 628B 0B / 4.096kB 9 21.684ms 0.39% # 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 % ba07824a4ab6 25584df418d3-service 0.01% 53.25kB / 16.76GB 0.00% 0B / 0B 0B / 0B 1 3.407ms 0.01% b45b0a87c601 81e1b69c244d-infra 0.01% 53.25kB / 16.76GB 0.00% 1.986kB / 698B 0B / 0B 1 3.124ms 0.01% 3d61c65066dc nginx-pod-pod-nginx-pod 0.08% 6.644MB / 16.76GB 0.04% 1.986kB / 698B 0B / 4.096kB 9 21.684ms 0.08% # display for a specific container [root@dlp ~]# podman stats 3d61c65066dc --no-stream ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU % 3d61c65066dc nginx-pod-pod-nginx-pod 0.03% 6.644MB / 16.76GB 0.04% 2.126kB / 768B 0B / 4.096kB 9 21.684ms 0.03% # specify time interval for streaming display (sec) # * default --interval is 5 sec [root@dlp ~]# podman stats 3d61c65066dc --interval 10 ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU % 3d61c65066dc nginx-pod-pod-nginx-pod 0.02% 6.644MB / 16.76GB 0.04% 2.196kB / 838B 0B / 4.096kB 9 21.684ms 0.02% # display with specific format [root@dlp ~]# podman stats --no-stream --format "table {{.ID}} {{.CPUPerc}} {{.MemPerc}}" ID CPU % MEM % ba07824a4ab6 0.00% 0.00% b45b0a87c601 0.00% 0.00% 3d61c65066dc 0.02% 0.04% |
Sponsored Link |