Podman : Display Container resource usage2023/11/16 |
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 % 0680feffa44f nginx-pod-pod-nginx-pod 1.27% 6.783MB / 16.75GB 0.04% 1.628kB / 426B 0B / 0B 9 22.15ms 1.27% 2177ae987cd9 25584df418d3-service 0.17% 57.34kB / 16.75GB 0.00% 0B / 0B 0B / 0B 1 3.32ms 0.17% 69364388c0ab 1b5a2bca1908-infra 0.16% 57.34kB / 16.75GB 0.00% 1.628kB / 426B 0B / 0B 1 2.872ms 0.16% # 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 % 0680feffa44f nginx-pod-pod-nginx-pod 0.08% 6.783MB / 16.75GB 0.04% 1.978kB / 656B 0B / 4.096kB 9 22.15ms 0.08% 2177ae987cd9 25584df418d3-service 0.01% 57.34kB / 16.75GB 0.00% 0B / 0B 0B / 0B 1 3.32ms 0.01% 69364388c0ab 1b5a2bca1908-infra 0.01% 57.34kB / 16.75GB 0.00% 1.978kB / 656B 0B / 0B 1 2.872ms 0.01% # display for a specific container [root@dlp ~]# podman stats 0680feffa44f --no-stream ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU % 0680feffa44f nginx-pod-pod-nginx-pod 0.04% 6.783MB / 16.75GB 0.04% 2.048kB / 726B 0B / 4.096kB 9 22.15ms 0.04% # specify time interval for streaming display (sec) # * default --interval is 5 sec [root@dlp ~]# podman stats 0680feffa44f --interval 10 ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS CPU TIME AVG CPU % 0680feffa44f nginx-pod-pod-nginx-pod 0.00% 6.783MB / 16.75GB 0.04% 2.188kB / 796B 0B / 4.096kB 9 22.15ms 0.03% # display with specific format [root@dlp ~]# podman stats --no-stream --format "table {{.ID}} {{.CPUPerc}} {{.MemPerc}}" ID CPU % MEM % 0680feffa44f 0.02% 0.04% 2177ae987cd9 0.00% 0.00% 69364388c0ab 0.00% 0.00% |
Sponsored Link |
|