diff options
author | gnn <gnn@FreeBSD.org> | 2012-05-12 20:38:18 +0000 |
---|---|---|
committer | gnn <gnn@FreeBSD.org> | 2012-05-12 20:38:18 +0000 |
commit | 4297c1b2d07fec7f50b70e26e3adb4d062b19e15 (patch) | |
tree | aec2772e8855e6dbaea6d8136ed0c47bcb825dee /Examples/sampleproc_example.txt | |
parent | 111c75a23278cd9317f0a13867c22ee0f6c95b26 (diff) | |
download | FreeBSD-src-4297c1b2d07fec7f50b70e26e3adb4d062b19e15.zip FreeBSD-src-4297c1b2d07fec7f50b70e26e3adb4d062b19e15.tar.gz |
Add the remaining scripts from the DTraceToolkit, version 0.99, to the
vendor tree.
http://www.brendangregg.com/dtrace.html#DTraceToolkit
Diffstat (limited to 'Examples/sampleproc_example.txt')
-rw-r--r-- | Examples/sampleproc_example.txt | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Examples/sampleproc_example.txt b/Examples/sampleproc_example.txt new file mode 100644 index 0000000..d60d446 --- /dev/null +++ b/Examples/sampleproc_example.txt @@ -0,0 +1,62 @@ +The following is an example of the sampleproc program. + + +Here we run sampleproc for a few seconds on a workstation, + + # ./sampleproc + Sampling at 100 hertz... Hit Ctrl-C to end. + ^C + PID CMD COUNT + 1659 mozilla-bin 3 + 109 nscd 4 + 2197 prstat 23 + 2190 setiathome 421 + + PID CMD PERCENT + 1659 mozilla-bin 0 + 109 nscd 0 + 2197 prstat 5 + 2190 setiathome 93 + +The first table shows a count of how many times each process was sampled +on the CPU. The second table gives this as a percentage. + +setiathome was on the CPU 421 times, which is 93% of the samples. + + + + +The following is sampleproc running on a server with 4 CPUs. A bash shell +is running in an infinate loop, + + # ./sampleproc + Sampling at 100 hertz... Hit Ctrl-C to end. + ^C + PID CMD COUNT + 10140 dtrace 1 + 28286 java 1 + 29345 esd 2 + 29731 esd 3 + 2 pageout 4 + 29733 esd 6 + 10098 bash 1015 + 0 sched 3028 + + PID CMD PERCENT + 10140 dtrace 0 + 28286 java 0 + 29345 esd 0 + 29731 esd 0 + 2 pageout 0 + 29733 esd 0 + 10098 bash 24 + 0 sched 74 + +The bash shell was on the CPUs for 24% of the time, which is consistant +with a CPU bound single threaded application on a 4 CPU server. + +The above sample was around 10 seconds long. During this time, there were +around 4000 samples (checking the COUNT column), this is due to +4000 = CPUs (4) * Hertz (100) * Seconds (10). + + |