1 VMSTAT(1M) Maintenance Commands VMSTAT(1M) 2 3 4 5 NAME 6 vmstat - report virtual memory statistics 7 8 SYNOPSIS 9 vmstat [-ipqsS] [-T u | d] [disks] [interval [count]] 10 11 12 DESCRIPTION 13 vmstat reports virtual memory statistics regarding kernel thread, 14 virtual memory, disk, trap, and CPU activity. 15 16 17 On MP (multi-processor) systems, vmstat averages the number of CPUs into 18 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 26 memory 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 43 OPTIONS 44 The following options are supported: 45 46 -i 47 Report the number of interrupts per device. count and 48 interval does not apply to the -i option. 49 50 51 -p 52 Report paging activity in details. This option will 53 display the following, respectively: 54 55 epi 56 Executable page-ins. 57 58 59 epo 60 Executable page-outs. 61 62 63 epf 64 Executable page-frees. 65 66 67 api 68 Anonymous page-ins. 69 70 71 apo 72 Anonymous page-outs. 73 74 75 apf 76 Anonymous page-frees. 77 78 79 fpi 80 File system page-ins. 81 82 83 fpo 84 File system page-outs. 85 86 87 fpf 88 File system page-frees. 89 90 When executed in a zone and if the pools facility is 91 active, all of the above only report actitivity on the 92 processors in the processor set of the zone's pool. 93 94 95 -q 96 Suppress messages related to state changes. 97 98 99 -s 100 Display the total number of various system events since 101 boot. count and interval does not apply to the -s option. 102 103 104 -S 105 Report on swapping rather than paging activity. This 106 option will change two fields in vmstat's ``paging'' 107 display: rather than the ``re'' and ``mf'' fields, vmstat 108 will report ``si'' (swap-ins) and ``so'' (swap-outs). 109 110 111 -T u | d 112 Specify u for a printed representation of the internal 113 representation of time. See time(2). Specify d for 114 standard date format. See date(1). 115 116 117 OPERANDS 118 The following operands are supported: 119 120 count 121 Specifies the number of times that the statistics are 122 repeated. count does not apply to the -i and -s options. 123 124 125 disks 126 Specifies which disks are to be given priority in the 127 output (only four disks fit on a line). Common disk names 128 are id, sd, xd, or xy, followed by a number (for example, 129 sd2, xd0, and so forth). 130 131 132 interval 133 Specifies the last number of seconds over which vmstat 134 summarizes activity. This number of seconds repeats 135 forever. interval does not apply to the -i and -s options. 136 137 138 EXAMPLES 139 Example 1 Using vmstat 140 141 142 The following command displays a summary of what the system is doing 143 every five seconds. 144 145 146 example% vmstat 5 147 148 149 kthr memory page disk faults cpu 150 r b w swap free re mf pi p fr de sr s0 s1 s2 s3 in sy cs us sy id 151 0 0 0 11456 4120 1 41 19 1 3 0 2 0 4 0 0 48 112 130 4 14 82 152 0 0 1 10132 4280 0 4 44 0 0 0 0 0 23 0 0 211 230 144 3 35 62 153 0 0 1 10132 4616 0 0 20 0 0 0 0 0 19 0 0 150 172 146 3 33 64 154 0 0 1 10132 5292 0 0 9 0 0 0 0 0 21 0 0 165 105 130 1 21 78 155 1 1 1 10132 5496 0 0 5 0 0 0 0 0 23 0 0 183 92 134 1 20 79 156 1 0 1 10132 5564 0 0 25 0 0 0 0 0 18 0 0 131 231 116 4 34 62 157 1 0 1 10124 5412 0 0 37 0 0 0 0 0 22 0 0 166 179 118 1 33 67 158 1 0 1 10124 5236 0 0 24 0 0 0 0 0 14 0 0 109 243 113 4 56 39 159 ^C 160 161 example% 162 163 164 165 166 The fields of vmstat's display are 167 168 169 kthr 170 Report the number of kernel threads in each of the three 171 following states: 172 173 r 174 the number of kernel threads in run queue 175 176 177 b 178 the number of blocked kernel threads that are waiting 179 for resources I/O, paging, and so forth 180 181 182 w 183 the number of swapped out lightweight processes (LWPs) 184 that are waiting for processing resources to finish. 185 186 187 188 memory 189 Report on usage of virtual and real memory. 190 191 swap 192 available swap space (Kbytes) 193 194 195 free 196 size of the free list (Kbytes) 197 198 199 200 page 201 Report information about page faults and paging activity. The 202 information on each of the following activities is given in 203 units per second. 204 205 re 206 page reclaims but see the -S option for how this field 207 is modified. 208 209 210 mf 211 minor faults but see the -S option for how this field 212 is modified. 213 214 215 pi 216 kilobytes paged in 217 218 219 po 220 kilobytes paged out 221 222 223 fr 224 kilobytes freed 225 226 227 de 228 anticipated short-term memory shortfall (Kbytes) 229 230 231 sr 232 pages scanned by clock algorithm 233 234 When executed in a zone and if the pools facility is active, 235 all of the above (except for "de") only report activity on 236 the processors in the processor set of the zone's pool. 237 238 239 disk 240 Report the number of disk operations per second. There are 241 slots for up to four disks, labeled with a single letter and 242 number. The letter indicates the type of disk (s = SCSI, i = 243 IPI, and so forth); the number is the logical unit number. 244 245 246 faults 247 Report the trap/interrupt rates (per second). 248 249 in 250 interrupts 251 252 253 sy 254 system calls 255 256 257 cs 258 CPU context switches 259 260 When executed in a zone and if the pools facility is active, 261 all of the above only report actitivity on the processors in 262 the processor set of the zone's pool. 263 264 265 cpu 266 Give a breakdown of percentage usage of CPU time. On MP 267 systems, this is an average across all processors. 268 269 us 270 user time 271 272 273 sy 274 system time 275 276 277 id 278 idle time 279 280 When executed in a zone and if the pools facility is active, 281 all of the above only report actitivity on the processors in 282 the processor set of the zone's pool. 283 284 285 ATTRIBUTES 286 See attributes(5) for descriptions of the following attributes: 287 288 289 290 291 +--------------------+-----------------+ 292 | ATTRIBUTE TYPE | ATTRIBUTE VALUE | 293 +--------------------+-----------------+ 294 |Interface Stability | See below. | 295 +--------------------+-----------------+ 296 297 298 Invocation is evolving. Human readable output is unstable. 299 300 SEE ALSO 301 date(1), sar(1), iostat(1M), mpstat(1M), sar(1M), time(2), 302 attributes(5) 303 304 NOTES 305 The sum of CPU utilization might vary slightly from 100 because of 306 rounding errors in the production of a percentage figure. 307 308 309 310 311 April 14, 2015 VMSTAT(1M)