1 The following is a demonstration of the dvmstat program,
4 Here we run dvmstat to monitor all processes called "find". In another
5 window, a "find /" command is run,
8 re maj mf fr epi epo api apo fpi fpo sy
11 6336 0 372 0 0 0 0 0 0 0 22255
12 1624 0 0 0 0 0 0 0 0 0 5497
13 2292 0 0 0 0 0 0 0 0 0 7715
14 13064 0 0 0 0 0 0 0 0 0 43998
15 7972 168 0 0 0 0 0 0 168 0 38361
16 468 636 0 0 0 0 0 0 636 0 13774
17 376 588 0 0 0 0 0 0 588 0 10723
18 80 636 0 0 0 0 0 0 656 0 11078
19 48 772 0 0 0 0 0 0 812 0 9841
20 16 1028 0 0 0 0 0 0 1056 0 10752
21 0 1712 0 0 0 0 0 0 1740 0 12176
22 4 1224 0 0 0 0 0 0 1236 0 9024
24 The output above is spectacular! When the find command is first run,
25 it begins be reading data from the file cache, as indicated by the "re"
26 reclaims, and a lack of "fpi" filesystem page ins.
28 Eventually the find command travels to places which are not cached, we can
29 see the "re" value drops, and both the "maj" major faults and "fpi" values
30 increase. This transition from cache hits to file system activity is
31 very clear from the above output.
35 Here we run a dvmstat to examine the PID 3778,
38 re maj mf fr epi epo api apo fpi fpo sy
41 24 28 0 0 0 0 0 0 28 0 109
42 4 148 16 0 0 0 0 0 148 0 1883
43 16 412 384 0 0 0 0 0 412 0 21019
45 0 0 0 0 0 0 0 0 0 0 221
47 0 0 0 0 0 0 0 0 0 0 84
50 Here we can see the statistics for that process only.
54 The following runs the date command through dvmstat,
57 Sun Jun 12 17:44:24 EST 2005
58 re maj mf fr epi epo api apo fpi fpo sy
59 16 0 208 0 0 0 0 0 0 0 38
61 The values above are for the date command only.
65 Now we run dvmstat on a tar command. Here we tar around 50Mb of files,
66 so the command takes around 20 seconds to complete,
68 # dvmstat tar cf backup.tar DTrace
69 re maj mf fr epi epo api apo fpi fpo sy
70 20 256 304 0 8 0 0 0 352 0 621
71 4540 56 896 0 0 0 0 0 4636 0 1005
72 4432 12 644 0 0 0 0 0 4384 0 906
73 680 180 136 0 8 0 0 0 1056 0 502
74 2328 60 468 0 0 0 0 0 2296 0 592
75 1300 380 272 0 0 0 0 0 1704 0 1095
76 2816 72 560 0 0 0 0 0 2940 0 709
77 4084 40 416 0 0 0 0 0 4220 0 894
78 2764 4 276 0 0 0 0 0 2700 0 566
79 1824 96 328 0 0 0 0 0 2072 0 556
80 3408 80 392 0 20 0 0 0 3496 0 857
81 2804 92 552 0 4 0 0 0 2924 0 741
82 1344 16 272 0 0 0 0 0 1376 0 289
83 3284 52 520 0 12 0 0 0 3260 0 743
84 4832 200 812 0 0 0 0 0 5292 0 1276
85 11052 56 2200 0 0 0 0 0 8676 0 2326
86 5256 328 1020 0 8 0 0 0 4404 0 1725
87 re maj mf fr epi epo api apo fpi fpo sy
88 404 340 72 0 64 0 0 0 536 0 1135
90 Great! Activity from the tar command such as "fpi"s can be clearly seen.