Podman : Display Container resource usage2024/05/03 |
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 % 51b89ed10f3f 6c304dce5f16-service 0.07% 53.25kB / 16.76GB 0.00% 0B / 0B 0B / 0B 1 3.059ms 0.07% b587d62ff7b4 82c9e6726e1e-infra 0.06% 53.25kB / 16.76GB 0.00% 1.628kB / 558B 0B / 0B 1 2.949ms 0.06% d8b78c921bb7 nginx-pod-pod-nginx-pod 0.44% 6.353MB / 16.76GB 0.04% 1.628kB / 558B 0B / 0B 9 19.995ms 0.44% # 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 % 51b89ed10f3f 6c304dce5f16-service 0.01% 53.25kB / 16.76GB 0.00% 0B / 0B 0B / 0B 1 3.059ms 0.01% b587d62ff7b4 82c9e6726e1e-infra 0.01% 53.25kB / 16.76GB 0.00% 1.978kB / 698B 0B / 0B 1 2.949ms 0.01% d8b78c921bb7 nginx-pod-pod-nginx-pod 0.07% 6.353MB / 16.76GB 0.04% 1.978kB / 698B 0B / 4.096kB 9 19.995ms 0.07% # display for a specific container [root@dlp ~]# podman stats d8b78c921bb7 --no-stream ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU % d8b78c921bb7 nginx-pod-pod-nginx-pod 0.02% 6.353MB / 16.76GB 0.04% 2.188kB / 838B 0B / 4.096kB 9 19.995ms 0.02% # specify time interval for streaming display (sec) # * default --interval is 5 sec [root@dlp ~]# podman stats d8b78c921bb7 --interval 10 ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU % d8b78c921bb7 nginx-pod-pod-nginx-pod 0.02% 6.353MB / 16.76GB 0.04% 2.188kB / 838B 0B / 4.096kB 9 19.995ms 0.02% # display with specific format [root@dlp ~]# podman stats --no-stream --format "table {{.ID}} {{.CPUPerc}} {{.MemPerc}}" ID CPU % MEM % 51b89ed10f3f 0.00% 0.00% b587d62ff7b4 0.00% 0.00% d8b78c921bb7 0.01% 0.04% |
Sponsored Link |