github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-stats.1.md (about) 1 % podman-stats(1) 2 3 ## NAME 4 podman\-stats - Display a live stream of one or more container's resource usage statistics 5 6 ## SYNOPSIS 7 **podman stats** [*options*] [*container*] 8 9 **podman container stats** [*options*] [*container*] 10 11 ## DESCRIPTION 12 Display a live stream of one or more containers' resource usage statistics 13 14 Note: Podman stats will not work in rootless environments that use CGroups V1. 15 Podman stats relies on CGroup information for statistics, and CGroup v1 is not 16 supported for rootless use cases. 17 18 Note: Rootless environments that use CGroups V2 are not able to report statistics 19 about their networking usage. 20 21 ## OPTIONS 22 23 #### **--all**, **-a** 24 25 Show all containers. Only running containers are shown by default 26 27 #### **--format**=*template* 28 29 Pretty-print container statistics to JSON or using a Go template 30 31 Valid placeholders for the Go template are listed below: 32 33 | **Placeholder** | **Description** | 34 | --------------- | ------------------ | 35 | .ID | Container ID | 36 | .Name | Container Name | 37 | .CPUPerc | CPU percentage | 38 | .MemUsage | Memory usage | 39 | .MemUsageBytes | Memory usage (IEC) | 40 | .MemPerc | Memory percentage | 41 | .NetIO | Network IO | 42 | .BlockIO | Block IO | 43 | .PIDS | Number of PIDs | 44 45 When using a GO template, you may precede the format with `table` to print headers. 46 47 #### **--interval**=*seconds*, **-i**=*seconds* 48 49 Time in seconds between stats reports, defaults to 5 seconds. 50 51 #### **--latest**, **-l** 52 53 Instead of providing the container name or ID, use the last created container. If you use methods other than Podman 54 to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) 55 56 #### **--no-reset** 57 58 Do not clear the terminal/screen in between reporting intervals 59 60 #### **--no-stream** 61 62 Disable streaming stats and only pull the first result, default setting is false 63 64 ## EXAMPLE 65 66 ``` 67 # podman stats -a --no-stream 68 ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS 69 a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -- / -- 2 70 3b33001239ee sleepy_stallman -- -- / -- -- -- / -- -- / -- -- 71 ``` 72 73 ``` 74 # podman stats --no-stream a9f80 75 ID NAME CPU % MEM USAGE / LIMIT MEM % NET IO BLOCK IO PIDS 76 a9f807ffaacd frosty_hodgkin -- 3.092MB / 16.7GB 0.02% -- / -- -- / -- 2 77 ``` 78 79 ``` 80 # podman stats --no-stream --format=json a9f80 81 [ 82 { 83 "id": "a9f807ffaacd", 84 "name": "frosty_hodgkin", 85 "cpu_percent": "--", 86 "mem_usage": "3.092MB / 16.7GB", 87 "mem_percent": "0.02%", 88 "netio": "-- / --", 89 "blocki": "-- / --", 90 "pids": "2" 91 } 92 ] 93 ``` 94 95 ``` 96 # podman stats --no-stream --format "table {{.ID}} {{.Name}} {{.MemUsage}}" 6eae 97 ID NAME MEM USAGE / LIMIT 98 6eae9e25a564 clever_bassi 3.031MB / 16.7GB 99 ``` 100 101 Note: When using a slirp4netns network with the rootlesskit port 102 handler, the traffic send via the port forwarding will be accounted to 103 the `lo` device. Traffic accounted to `lo` is not accounted in the 104 stats output. 105 106 107 ## SEE ALSO 108 **[podman(1)](podman.1.md)** 109 110 ## HISTORY 111 July 2017, Originally compiled by Ryan Cole <rycole@redhat.com>