1The following is a demonstration of the vmstat-p.d script,
2
3
4We run both vmstat-p.d and the original vmstat(1M) command at the same time
5to compare outputs,
6
7 $ vmstat -p 1
8      memory           page          executable      anonymous      filesystem
9    swap  free  re  mf  fr  de  sr  epi  epo  epf  api  apo  apf  fpi  fpo  fpf
10  1144488 142456 2   8   1   0   0    0    0    0    0    0    0    2    1    1
11  1063812 84472 18  92   0   0   0    0    0    0    0    0    0    0    0    0
12  1050404 75108  0   0   0   0   0    0    0    0    0    0    0    0    0    0
13  1050404 75108  0   0   0   0   0    0    0    0    0    0    0    0    0    0
14  1050404 75108 476 150  0   0   0    0    0    0    0    0    0    0    0    0
15  1050184 74772 73   0   0   0   0    0    0    0    0    0    0  788    0    0
16  1050400 74988 2371 173 0   0   0    0    0    0    0    0    0    0    0    0
17  1050400 75100 1057 0   0   0   0    0    0    0    0    0    0    0    0    0
18  1050400 75100  2   0   0   0   0    0    0    0    0    0    0    4    0    0
19  1050400 75100  0   0   0   0   0    0    0    0    0    0    0    0    0    0
20  1050400 75100 4529 172 0   0   0    0    0    0    0    0    0  192    0    0
21  1050400 75104  0   0   0   0   0    0    0    0    0    0    0  467    0    0
22  1050400 75104  0   0   0   0   0    0    0    0    0    0    0    0    0    0
23
24 # ./vmstat-p.d
25         memory          page       executable      anonymous    filesystem
26      swap    free    re   mf  sr  epi  epo  epf  api  apo  apf  fpi  fpo  fpf
27   1050404   75108     8   80   0    0    0    0    0    0    0    0    0    0
28   1050404   75108     0    0   0    0    0    0    0    0    0    0    0    0
29   1050404   75108     0    0   0    0    0    0    0    0    0    0    0    0
30   1050180   74768  2216  608   0    0    0    0    0    0    0  568    0    0
31   1050400   74988     4    0   0    0    0    0    0    0    0  228    0    0
32   1050400   75100 13852  700   0    0    0    0    0    0    0    0    0    0
33   1050400   75100     8    0   0    0    0    0    0    0    0    4    0    0
34   1050400   75100     0    0   0    0    0    0    0    0    0    0    0    0
35   1050400   75100     0    0   0    0    0    0    0    0    0    0    0    0
36   1050400   75104 18480  700   0    0    0    0    0    0    0  668    0    0
37   1050400   75104     0    0   0    0    0    0    0    0    0    0    0    0
38
39Above we can see the columns are corresponding well. "re" and "mf" in the
40DTrace output appear four times as large as they should be, because in the
41DTrace output we are printing Kbs not page counts (for consistancy).
42
43The DTrace output lacks the "summary since boot" line, as it is not using
44Kstat to fetch this data.
45
46
47The vmstat-p.d script is not intended itself as a useful program, rather it
48is intended as a starting point for other DTrace scripts; a starting point
49of familiar statistics to provide the programmer with a "common ground"
50of knowledge.
51
52