1vmstat(1M)              System Administration Commands              vmstat(1M)
2
3
4

NAME

6       vmstat - report virtual memory statistics
7

SYNOPSIS

9       vmstat [-cipqsS] [-T u | d] [disks] [interval [count]]
10
11

DESCRIPTION

13       vmstat  reports virtual memory statistics regarding kernel thread, vir‐
14       tual memory, disk, trap, and CPU activity.
15
16
17       On MP (multi-processor) systems, vmstat averages  the  number  of  CPUs
18       into the output. For per-processor statistics, see mpstat(1M).
19
20
21       vmstat  only  supports statistics for certain devices. For more general
22       system statistics, use sar(1), iostat(1M), or sar(1M).
23
24
25       Without options, vmstat displays a one-line summary of the virtual mem‐
26       ory activity since the system was booted.
27
28
29       During  execution of the kernel status command, the state of the system
30       can change. If relevant, a state change  message  is  included  in  the
31       vmstat output, in one of the following forms:
32
33         <<device added: sd0>>
34         <<device removed: sd0>>
35         <<processors added: 1, 3>>
36         <<processors removed: 1, 3>>
37
38
39
40
41       See  for device naming conventions for disks.
42

OPTIONS

44       The following options are supported:
45
46       -c           Report cache flushing statistics. This option is obsolete,
47                    and no longer meaningful. This option might be removed  in
48                    a future version of Solaris.
49
50
51       -i           Report  the  number  of  interrupts  per device. count and
52                    interval does not apply to the -i option.
53
54
55       -p           Report paging activity in details. This option  will  dis‐
56                    play the following, respectively:
57
58                    epi    Executable page-ins.
59
60
61                    epo    Executable page-outs.
62
63
64                    epf    Executable page-frees.
65
66
67                    api    Anonymous page-ins.
68
69
70                    apo    Anonymous page-outs.
71
72
73                    apf    Anonymous page-frees.
74
75
76                    fpi    File system page-ins.
77
78
79                    fpo    File system page-outs.
80
81
82                    fpf    File system page-frees.
83
84                    When  executed  in  a  zone  and  if the pools facility is
85                    active, all of the above only  report  actitivity  on  the
86                    processors in the processor set of the zone's pool.
87
88
89       -q           Suppress messages related to state changes.
90
91
92       -s           Display  the  total  number of various system events since
93                    boot. count and interval does not apply to the -s option.
94
95
96       -S           Report on  swapping  rather  than  paging  activity.  This
97                    option  will change two fields in vmstat's ``paging'' dis‐
98                    play: rather than the ``re''  and  ``mf''  fields,  vmstat
99                    will report ``si'' (swap-ins) and ``so'' (swap-outs).
100
101
102       -T u |  d    Specify  u  for  a  printed representation of the internal
103                    representation of time. See time(2). Specify d  for  stan‐
104                    dard date format. See date(1).
105
106

OPERANDS

108       The following operands are supported:
109
110       count       Specifies  the  number  of  times  that  the statistics are
111                   repeated. count does not apply to the -i and -s options.
112
113
114       disks       Specifies which disks are to be given priority in the  out‐
115                   put  (only four disks fit on a line). Common disk names are
116                   id, sd, xd, or xy, followed by a number (for example,  sd2,
117                   xd0, and so forth).
118
119
120       interval    Specifies the last number of seconds over which vmstat sum‐
121                   marizes activity. This number of seconds  repeats  forever.
122                   interval does not apply to the -i and -s options.
123
124

EXAMPLES

126       Example 1 Using vmstat
127
128
129       The  following  command  displays a summary of what the system is doing
130       every five seconds.
131
132
133         example% vmstat 5
134
135
136         kthr   memory          page             disk      faults        cpu
137         r b w swap  free re mf pi p fr de sr s0 s1 s2 s3  in  sy  cs us sy id
138         0 0 0 11456 4120 1  41 19 1  3  0  2  0  4  0  0  48 112 130  4 14 82
139         0 0 1 10132 4280 0   4 44 0  0  0  0  0 23  0  0 211 230 144  3 35 62
140         0 0 1 10132 4616 0   0 20 0  0  0  0  0 19  0  0 150 172 146  3 33 64
141         0 0 1 10132 5292 0   0  9 0  0  0  0  0 21  0  0 165 105 130  1 21 78
142         1 1 1 10132 5496 0   0  5 0  0  0  0  0 23  0  0 183  92 134  1 20 79
143         1 0 1 10132 5564 0   0 25 0  0  0  0  0 18  0  0 131 231 116  4 34 62
144         1 0 1 10124 5412 0   0 37 0  0  0  0  0 22  0  0 166 179 118  1 33 67
145         1 0 1 10124 5236 0   0 24 0  0  0  0  0 14  0  0 109 243 113  4 56 39
146         ^C
147
148         example%
149
150
151
152
153       The fields of vmstat's display are
154
155
156       kthr      Report the number of kernel threads in each of the three fol‐
157                 lowing states:
158
159                 r    the number of kernel threads in run queue
160
161
162                 b    the  number  of  blocked kernel threads that are waiting
163                      for resources I/O, paging, and so forth
164
165
166                 w    the number of swapped out lightweight  processes  (LWPs)
167                      that are waiting for processing resources to finish.
168
169
170
171       memory    Report on usage of virtual and real memory.
172
173                 swap    available swap space (Kbytes)
174
175
176                 free    size of the free list (Kbytes)
177
178
179
180       page      Report information about page faults and paging activity. The
181                 information on each of the following activities is  given  in
182                 units per second.
183
184                 re    page  reclaims  —  but  see  the -S option for how this
185                       field is modified.
186
187
188                 mf    minor faults — but see the -S option for how this field
189                       is modified.
190
191
192                 pi    kilobytes paged in
193
194
195                 po    kilobytes paged out
196
197
198                 fr    kilobytes freed
199
200
201                 de    anticipated short-term memory shortfall (Kbytes)
202
203
204                 sr    pages scanned by clock algorithm
205
206                 When  executed in a zone and if the pools facility is active,
207                 all of the above (except for "de") only  report  activity  on
208                 the processors in the processor set of the zone's pool.
209
210
211       disk      Report  the  number  of disk operations per second. There are
212                 slots for up to four disks, labeled with a single letter  and
213                 number.  The letter indicates the type of disk (s = SCSI, i =
214                 IPI, and so forth); the number is the logical unit number.
215
216
217       faults    Report the trap/interrupt rates (per second).
218
219                 in    interrupts
220
221
222                 sy    system calls
223
224
225                 cs    CPU context switches
226
227                 When executed in a zone and if the pools facility is  active,
228                 all  of the above only report actitivity on the processors in
229                 the processor set of the zone's pool.
230
231
232       cpu       Give a breakdown of percentage usage of CPU time. On MP  sys‐
233                 tems, this is an average across all processors.
234
235                 us    user time
236
237
238                 sy    system time
239
240
241                 id    idle time
242
243                 When  executed in a zone and if the pools facility is active,
244                 all of the above only report actitivity on the processors  in
245                 the processor set of the zone's pool.
246
247

ATTRIBUTES

249       See attributes(5) for descriptions of the following attributes:
250
251
252
253
254       ┌─────────────────────────────┬─────────────────────────────┐
255       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
256       ├─────────────────────────────┼─────────────────────────────┤
257       │Availability                 │SUNWcsu                      │
258       ├─────────────────────────────┼─────────────────────────────┤
259       │Interface Stability          │See below.                   │
260       └─────────────────────────────┴─────────────────────────────┘
261
262
263       Invocation is evolving. Human readable output is unstable.
264

SEE ALSO

266       date(1),    sar(1),    iostat(1M),    mpstat(1M),   sar(1M),   time(2),
267       attributes(5)
268

NOTES

270       The sum of CPU utilization might vary  slightly  from  100  because  of
271       rounding errors in the production of a percentage figure.
272
273
274       The  -c  option  (Report cache flushing statistics) is not supported in
275       this release.
276
277
278
279SunOS 5.11                        23 Mar 2009                       vmstat(1M)
Impressum