1podman-stats(1)             General Commands Manual            podman-stats(1)
2
3
4

NAME

6       podman-stats  -  Display  a  live stream of one or more container's re‐
7       source usage statistics
8
9

SYNOPSIS

11       podman stats [options] [container]
12
13
14       podman container stats [options] [container]
15
16

DESCRIPTION

18       Display a live stream of one or more containers' resource usage statis‐
19       tics
20
21
22       Note:   Podman  stats  does  not work in rootless environments that use
23       CGroups V1.  Podman stats relies on CGroup information for  statistics,
24       and CGroup v1 is not supported for rootless use cases.
25
26
27       Note:  Rootless environments that use CGroups V2 are not able to report
28       statistics about their networking usage.
29
30

OPTIONS

32   --all, -a
33       Show all containers.  Only running containers are shown by default
34
35
36   --format=template
37       Pretty-print container statistics to JSON or using a Go template
38
39
40       Valid placeholders for the Go template are listed below:
41
42
43       ┌────────────────────┬────────────────────────────┐
44Placeholder         Description                
45       ├────────────────────┼────────────────────────────┤
46.AvgCPU             │ Average CPU,  full  preci‐ │
47       │                    │ sion float                 │
48       ├────────────────────┼────────────────────────────┤
49.AVGCPU             │ Average  CPU, formatted as │
50       │                    │ a percent                  │
51       ├────────────────────┼────────────────────────────┤
52.BlockInput         │ Total data read from block │
53       │                    │ device                     │
54       ├────────────────────┼────────────────────────────┤
55.BlockIO            │ Total data read/total data │
56       │                    │ written to block device    │
57       ├────────────────────┼────────────────────────────┤
58.BlockOutput        │ Total  data   written   to │
59       │                    │ block device               │
60       ├────────────────────┼────────────────────────────┤
61.ContainerID        │ Container  ID,  full  (un‐ │
62       │                    │ truncated) hash            │
63       ├────────────────────┼────────────────────────────┤
64.ContainerStats ... │ Nested structure, for  ex‐ │
65       │                    │ perts only                 │
66       ├────────────────────┼────────────────────────────┤
67.CPU                │ Percent  CPU,  full preci‐ │
68       │                    │ sion float                 │
69       ├────────────────────┼────────────────────────────┤
70.CPUNano            │ CPU   Usage,   total,   in │
71       │                    │ nanoseconds                │
72       ├────────────────────┼────────────────────────────┤
73.CPUPerc            Percentage of CPU used     
74       ├────────────────────┼────────────────────────────┤
75.CPUSystemNano      │ CPU   Usage,   kernel,  in │
76       │                    │ nanoseconds                │
77       ├────────────────────┼────────────────────────────┤
78.Duration           Same as CPUNano            
79       ├────────────────────┼────────────────────────────┤
80.ID                 Container ID, truncated    
81       ├────────────────────┼────────────────────────────┤
82.MemLimit           Memory limit, in bytes     
83       ├────────────────────┼────────────────────────────┤
84.MemPerc            Memory percentage used     
85       ├────────────────────┼────────────────────────────┤
86.MemUsage           Memory usage               
87       ├────────────────────┼────────────────────────────┤
88.MemUsageBytes      Memory usage (IEC)         
89       ├────────────────────┼────────────────────────────┤
90.Name               Container Name             
91       ├────────────────────┼────────────────────────────┤
92.NetInput           Network Input              
93       ├────────────────────┼────────────────────────────┤
94.NetIO              Network IO                 
95       ├────────────────────┼────────────────────────────┤
96.NetOutput          Network Output             
97       ├────────────────────┼────────────────────────────┤
98.PerCPU             │ CPU time consumed  by  all │
99       │                    │ tasks [1]                  │
100       ├────────────────────┼────────────────────────────┤
101.PIDs               Number of PIDs             
102       ├────────────────────┼────────────────────────────┤
103.PIDS               │ Number  of  PIDs  (yes, we │
104       │                    │ know it's a dup)           │
105       ├────────────────────┼────────────────────────────┤
106.SystemNano         │ Current  system  datetime, │
107       │                    │ nanoseconds since epoch    │
108       ├────────────────────┼────────────────────────────┤
109.Up                 │ Duration (CPUNano), in hu‐ │
110       │                    │ man-readable form          │
111       ├────────────────────┼────────────────────────────┤
112.UpTime             Same as Up                 
113       └────────────────────┴────────────────────────────┘
114
115       [1] Cgroups V1 only
116
117
118       When using a Go template, precede the format with table to print  head‐
119       ers.
120
121
122   --interval, -i=seconds
123       Time in seconds between stats reports, defaults to 5 seconds.
124
125
126   --latest, -l
127       Instead  of  providing  the  container name or ID, use the last created
128       container.  Note: the last started container can be from other users of
129       Podman on the host machine.  (This option is not available with the re‐
130       mote Podman client, including Mac  and  Windows  (excluding  WSL2)  ma‐
131       chines)
132
133
134   --no-reset
135       Do not clear the terminal/screen in between reporting intervals
136
137
138   --no-stream
139       Disable streaming stats and only pull the first result, default setting
140       is false
141
142
143   --no-trunc
144       Do not truncate output
145
146

EXAMPLE

148       # podman stats -a --no-stream
149       ID             NAME              CPU %   MEM USAGE / LIMIT   MEM %   NET IO    BLOCK IO   PIDS
150       a9f807ffaacd   frosty_hodgkin    --      3.092MB / 16.7GB    0.02%   -- / --   -- / --    2
151       3b33001239ee   sleepy_stallman   --      -- / --             --      -- / --   -- / --    --
152
153
154       # podman stats --no-stream a9f80
155       ID             NAME             CPU %   MEM USAGE / LIMIT   MEM %   NET IO    BLOCK IO   PIDS
156       a9f807ffaacd   frosty_hodgkin   --      3.092MB / 16.7GB    0.02%   -- / --   -- / --    2
157
158
159       $ podman stats --no-trunc 3667 --format 'table {{ .ID }} {{ .MemUsage }}'
160       ID                                                                MEM USAGE / LIMIT
161       3667c6aacb06aac2eaffce914c01736420023d56ef9b0f4cfe58b6d6a78b7503  49.15kB / 67.17GB
162
163
164       # podman stats --no-stream --format=json a9f80
165       [
166           {
167                           "id": "a9f807ffaacd",
168                           "name": "frosty_hodgkin",
169                           "cpu_percent": "--",
170                           "mem_usage": "3.092MB / 16.7GB",
171                           "mem_percent": "0.02%",
172                           "netio": "-- / --",
173                           "blocki": "-- / --",
174                           "pids": "2"
175           }
176       ]
177
178
179       # podman stats --no-stream --format "table {{.ID}} {{.Name}} {{.MemUsage}}" 6eae
180       ID             NAME           MEM USAGE / LIMIT
181       6eae9e25a564   clever_bassi   3.031MB / 16.7GB
182
183
184
185       Note: When using a slirp4netns network with the rootlesskit  port  han‐
186       dler,  the  traffic sent via the port forwarding is accounted to the lo
187       device.  Traffic accounted to lo is not accounted in the stats output.
188
189

SEE ALSO

191       podman(1)
192
193

HISTORY

195       July  2017,  Originally  compiled  by   Ryan   Cole   rycole@redhat.com
196       ⟨mailto:rycole@redhat.com⟩
197
198
199
200                                                               podman-stats(1)
Impressum