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  will  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         │ Block Input                │
53       ├────────────────────┼────────────────────────────┤
54       │.BlockIO            │ Block IO                   │
55       ├────────────────────┼────────────────────────────┤
56       │.BlockOutput        │ Block Output               │
57       ├────────────────────┼────────────────────────────┤
58       │.ContainerID        │ Container  ID,  full  (un‐ │
59       │                    │ truncated) hash            │
60       ├────────────────────┼────────────────────────────┤
61       │.ContainerStats ... │ Nested  structure, for ex‐ │
62       │                    │ perts only                 │
63       ├────────────────────┼────────────────────────────┤
64       │.CPU                │ Percent CPU,  full  preci‐ │
65       │                    │ sion float                 │
66       ├────────────────────┼────────────────────────────┤
67       │.CPUNano            │ CPU   Usage,   total,   in │
68       │                    │ nanoseconds                │
69       ├────────────────────┼────────────────────────────┤
70       │.CPUPerc            │ CPU percentage             │
71       ├────────────────────┼────────────────────────────┤
72       │.CPUSystemNano      │ CPU  Usage,   kernel,   in │
73       │                    │ nanoseconds                │
74       ├────────────────────┼────────────────────────────┤
75       │.Duration           │ Same as CPUNano            │
76       ├────────────────────┼────────────────────────────┤
77       │.ID                 │ Container ID, truncated    │
78       ├────────────────────┼────────────────────────────┤
79       │.MemLimit           │ Memory limit, in bytes     │
80       ├────────────────────┼────────────────────────────┤
81       │.MemPerc            │ Memory percentage          │
82       ├────────────────────┼────────────────────────────┤
83       │.MemUsage           │ Memory usage               │
84       ├────────────────────┼────────────────────────────┤
85       │.MemUsageBytes      │ Memory usage (IEC)         │
86       ├────────────────────┼────────────────────────────┤
87       │.Name               │ Container Name             │
88       ├────────────────────┼────────────────────────────┤
89       │.NetInput           │ Network Input              │
90       ├────────────────────┼────────────────────────────┤
91       │.NetIO              │ Network IO                 │
92       ├────────────────────┼────────────────────────────┤
93       │.NetOutput          │ Network Output             │
94       ├────────────────────┼────────────────────────────┤
95       │.PerCPU             │ CPU  time  consumed by all │
96       │                    │ tasks [1]                  │
97       ├────────────────────┼────────────────────────────┤
98       │.PIDs               │ Number of PIDs             │
99       ├────────────────────┼────────────────────────────┤
100       │.PIDS               │ Number of  PIDs  (yes,  we │
101       │                    │ know it's a dup)           │
102       ├────────────────────┼────────────────────────────┤
103       │.SystemNano         │ Current  system  datetime, │
104       │                    │ nanoseconds since epoch    │
105       ├────────────────────┼────────────────────────────┤
106       │.Up                 │ Duration (CPUNano), in hu‐ │
107       │                    │ man-readable form          │
108       ├────────────────────┼────────────────────────────┤
109       │.UpTime             │ Same as UpTime             │
110       └────────────────────┴────────────────────────────┘
111
112       [1] Cgroups V1 only
113
114
115       When  using  a  GO  template,  you may precede the format with table to
116       print headers.
117
118
119   --interval, -i=seconds
120       Time in seconds between stats reports, defaults to 5 seconds.
121
122
123   --latest, -l
124       Instead of providing the container name or ID,  use  the  last  created
125       container.  If you use methods other than Podman to run containers such
126       as CRI-O, the last started container could  be  from  either  of  those
127       methods.  (This  option is not available with the remote Podman client,
128       including Mac and Windows (excluding WSL2) machines)
129
130
131   --no-reset
132       Do not clear the terminal/screen in between reporting intervals
133
134
135   --no-stream
136       Disable streaming stats and only pull the first result, default setting
137       is false
138
139
140   --no-trunc
141       Do not truncate output
142
143

EXAMPLE

145              # podman stats -a --no-stream
146              ID             NAME              CPU %   MEM USAGE / LIMIT   MEM %   NET IO    BLOCK IO   PIDS
147              a9f807ffaacd   frosty_hodgkin    --      3.092MB / 16.7GB    0.02%   -- / --   -- / --    2
148              3b33001239ee   sleepy_stallman   --      -- / --             --      -- / --   -- / --    --
149
150
151
152              # podman stats --no-stream a9f80
153              ID             NAME             CPU %   MEM USAGE / LIMIT   MEM %   NET IO    BLOCK IO   PIDS
154              a9f807ffaacd   frosty_hodgkin   --      3.092MB / 16.7GB    0.02%   -- / --   -- / --    2
155
156
157
158              $ podman stats --no-trunc 3667 --format 'table {{ .ID }} {{ .MemUsage }}'
159              ID                                                                MEM USAGE / LIMIT
160              3667c6aacb06aac2eaffce914c01736420023d56ef9b0f4cfe58b6d6a78b7503  49.15kB / 67.17GB
161
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
180              # podman stats --no-stream --format "table {{.ID}} {{.Name}} {{.MemUsage}}" 6eae
181              ID             NAME           MEM USAGE / LIMIT
182              6eae9e25a564   clever_bassi   3.031MB / 16.7GB
183
184
185
186       Note:  When  using a slirp4netns network with the rootlesskit port han‐
187       dler, the traffic send via the port forwarding will be accounted to the
188       lo  device.  Traffic accounted to lo is not accounted in the stats out‐
189       put.
190
191

SEE ALSO

193       podman(1)
194
195

HISTORY

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