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