aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge V. Neville-Neil <gnn@FreeBSD.org>2012-05-12 20:38:18 +0000
committerGeorge V. Neville-Neil <gnn@FreeBSD.org>2012-05-12 20:38:18 +0000
commit055173dba4a263acf10325a49eebf82915369ed2 (patch)
treeaec2772e8855e6dbaea6d8136ed0c47bcb825dee
parent87c8f7aa3a46118212b99f0d58b18aa93c06b02a (diff)
downloadsrc-vendor/dtracetoolkit/dtracetoolkit-20120512.tar.gz
src-vendor/dtracetoolkit/dtracetoolkit-20120512.zip
Add the remaining scripts from the DTraceToolkit, version 0.99, to thevendor/dtracetoolkit/dtracetoolkit-20120512vendor/dtracetoolkit
-rw-r--r--Apps/Readme5
-rwxr-xr-xApps/httpdstat.d132
-rwxr-xr-xApps/nfswizard.d102
-rwxr-xr-xApps/shellsnoop268
-rwxr-xr-xApps/weblatency.d186
l---------Bin/anonpgpid.d1
l---------Bin/bitesize.d1
l---------Bin/connections1
l---------Bin/cpudists1
l---------Bin/cputimes1
l---------Bin/cputypes.d1
l---------Bin/cpuwalk.d1
l---------Bin/crash.d1
l---------Bin/creatbyproc.d1
l---------Bin/cswstat.d1
l---------Bin/dappprof1
l---------Bin/dapptrace1
l---------Bin/dexplorer1
l---------Bin/diskhits1
l---------Bin/dispqlen.d1
l---------Bin/dnlcps.d1
l---------Bin/dnlcsnoop.d1
l---------Bin/dnlcstat1
l---------Bin/dtruss1
l---------Bin/dvmstat1
l---------Bin/errinfo1
l---------Bin/execsnoop1
l---------Bin/fddist1
l---------Bin/filebyproc.d1
l---------Bin/fspaging.d1
l---------Bin/fsrw.d1
l---------Bin/guess.d1
l---------Bin/hotkernel1
l---------Bin/hotspot.d1
l---------Bin/hotuser1
l---------Bin/httpdstat.d1
l---------Bin/icmpstat.d1
l---------Bin/intbycpu.d1
l---------Bin/intoncpu.d1
l---------Bin/inttimes.d1
l---------Bin/iofile.d1
l---------Bin/iofileb.d1
l---------Bin/iopattern1
l---------Bin/iopending1
l---------Bin/iosnoop1
l---------Bin/iotop1
l---------Bin/j_calldist.d1
l---------Bin/j_calls.d1
l---------Bin/j_calltime.d1
l---------Bin/j_classflow.d1
l---------Bin/j_cpudist.d1
l---------Bin/j_cputime.d1
l---------Bin/j_events.d1
l---------Bin/j_flow.d1
l---------Bin/j_flowtime.d1
l---------Bin/j_methodcalls.d1
l---------Bin/j_objnew.d1
l---------Bin/j_package.d1
l---------Bin/j_profile.d1
l---------Bin/j_stat.d1
l---------Bin/j_syscalls.d1
l---------Bin/j_syscolors.d1
l---------Bin/j_thread.d1
l---------Bin/j_who.d1
l---------Bin/js_calldist.d1
l---------Bin/js_calls.d1
l---------Bin/js_calltime.d1
l---------Bin/js_cpudist.d1
l---------Bin/js_cputime.d1
l---------Bin/js_execs.d1
l---------Bin/js_flow.d1
l---------Bin/js_flowinfo.d1
l---------Bin/js_flowtime.d1
l---------Bin/js_objcpu.d1
l---------Bin/js_objgc.d1
l---------Bin/js_objnew.d1
l---------Bin/js_stat.d1
l---------Bin/js_who.d1
l---------Bin/kill.d1
l---------Bin/kstat_types.d1
l---------Bin/lastwords1
l---------Bin/loads.d1
l---------Bin/lockbydist.d1
l---------Bin/lockbyproc.d1
l---------Bin/minfbypid.d1
l---------Bin/minfbyproc.d1
l---------Bin/mmapfiles.d1
l---------Bin/modcalls.d1
l---------Bin/newproc.d1
l---------Bin/nfswizard.d1
l---------Bin/opensnoop1
l---------Bin/pathopens.d1
l---------Bin/pfilestat1
l---------Bin/pgpginbypid.d1
l---------Bin/pgpginbyproc.d1
l---------Bin/php_calldist.d1
l---------Bin/php_calltime.d1
l---------Bin/php_cpudist.d1
l---------Bin/php_cputime.d1
l---------Bin/php_flow.d1
l---------Bin/php_flowinfo.d1
l---------Bin/php_flowtime.d1
l---------Bin/php_funccalls.d1
l---------Bin/php_malloc.d1
l---------Bin/php_syscalls.d1
l---------Bin/php_syscolors.d1
l---------Bin/php_who.d1
l---------Bin/pidpersec.d1
l---------Bin/pl_calldist.d1
l---------Bin/pl_calltime.d1
l---------Bin/pl_cpudist.d1
l---------Bin/pl_cputime.d1
l---------Bin/pl_flow.d1
l---------Bin/pl_flowinfo.d1
l---------Bin/pl_flowtime.d1
l---------Bin/pl_malloc.d1
l---------Bin/pl_subcalls.d1
l---------Bin/pl_syscalls.d1
l---------Bin/pl_syscolors.d1
l---------Bin/pl_who.d1
l---------Bin/priclass.d1
l---------Bin/pridist.d1
l---------Bin/procsystime1
l---------Bin/putnexts.d1
l---------Bin/py_calldist.d1
l---------Bin/py_calltime.d1
l---------Bin/py_cpudist.d1
l---------Bin/py_cputime.d1
l---------Bin/py_flow.d1
l---------Bin/py_flowinfo.d1
l---------Bin/py_flowtime.d1
l---------Bin/py_funccalls.d1
l---------Bin/py_malloc.d1
l---------Bin/py_mallocstk.d1
l---------Bin/py_profile.d1
l---------Bin/py_syscalls.d1
l---------Bin/py_syscolors.d1
l---------Bin/py_who.d1
l---------Bin/rb_calldist.d1
l---------Bin/rb_calls.d1
l---------Bin/rb_calltime.d1
l---------Bin/rb_cpudist.d1
l---------Bin/rb_cputime.d1
l---------Bin/rb_flow.d1
l---------Bin/rb_flowinfo.d1
l---------Bin/rb_flowtime.d1
l---------Bin/rb_funccalls.d1
l---------Bin/rb_lines.d1
l---------Bin/rb_malloc.d1
l---------Bin/rb_objcpu.d1
l---------Bin/rb_objnew.d1
l---------Bin/rb_stat.d1
l---------Bin/rb_syscalls.d1
l---------Bin/rb_syscolors.d1
l---------Bin/rb_who.d1
l---------Bin/readbytes.d1
l---------Bin/readdist.d1
l---------Bin/rfileio.d1
l---------Bin/rfsio.d1
l---------Bin/runocc.d1
l---------Bin/rwbbypid.d1
l---------Bin/rwbypid.d1
l---------Bin/rwbytype.d1
l---------Bin/rwsnoop1
l---------Bin/rwtop1
l---------Bin/sampleproc1
l---------Bin/sar-c.d1
l---------Bin/seeksize.d1
l---------Bin/setuids.d1
l---------Bin/sh_calldist.d1
l---------Bin/sh_calls.d1
l---------Bin/sh_calltime.d1
l---------Bin/sh_cpudist.d1
l---------Bin/sh_cputime.d1
l---------Bin/sh_flow.d1
l---------Bin/sh_flowinfo.d1
l---------Bin/sh_flowtime.d1
l---------Bin/sh_lines.d1
l---------Bin/sh_pidcolors.d1
l---------Bin/sh_stat.d1
l---------Bin/sh_syscalls.d1
l---------Bin/sh_syscolors.d1
l---------Bin/sh_wasted.d1
l---------Bin/sh_who.d1
l---------Bin/shellsnoop1
l---------Bin/shortlived.d1
l---------Bin/sigdist.d1
l---------Bin/stacksize.d1
l---------Bin/statsnoop1
l---------Bin/swapinfo.d1
l---------Bin/sysbypid.d1
l---------Bin/syscallbypid.d1
l---------Bin/syscallbyproc.d1
l---------Bin/syscallbysysc.d1
l---------Bin/tcl_calldist.d1
l---------Bin/tcl_calls.d1
l---------Bin/tcl_calltime.d1
l---------Bin/tcl_cpudist.d1
l---------Bin/tcl_cputime.d1
l---------Bin/tcl_flow.d1
l---------Bin/tcl_flowtime.d1
l---------Bin/tcl_ins.d1
l---------Bin/tcl_insflow.d1
l---------Bin/tcl_proccalls.d1
l---------Bin/tcl_procflow.d1
l---------Bin/tcl_stat.d1
l---------Bin/tcl_syscalls.d1
l---------Bin/tcl_syscolors.d1
l---------Bin/tcl_who.d1
l---------Bin/tcpsnoop1
l---------Bin/tcpsnoop.d1
l---------Bin/tcpsnoop_snv1
l---------Bin/tcpsnoop_snv.d1
l---------Bin/tcpstat.d1
l---------Bin/tcptop1
l---------Bin/tcptop_snv1
l---------Bin/tcpwdist.d1
l---------Bin/threaded.d1
l---------Bin/topsyscall1
l---------Bin/topsysproc1
l---------Bin/udpstat.d1
l---------Bin/uname-a.d1
l---------Bin/vmbypid.d1
l---------Bin/vmstat-p.d1
l---------Bin/vmstat.d1
l---------Bin/vopstat1
l---------Bin/weblatency.d1
l---------Bin/whatexec.d1
l---------Bin/woof.d1
l---------Bin/wpm.d1
l---------Bin/writebytes.d1
l---------Bin/writedist.d1
l---------Bin/xcallsbypid.d1
l---------Bin/xvmstat1
l---------Bin/zvmstat1
-rw-r--r--Code/Java/Func_abc.java26
-rw-r--r--Code/Java/Func_loop.java19
-rw-r--r--Code/JavaScript/func_clock.html39
-rw-r--r--Code/JavaScript/func_slow.html31
-rwxr-xr-xCode/Perl/func_abc.pl20
-rwxr-xr-xCode/Perl/func_malloc.pl18
-rwxr-xr-xCode/Perl/func_slow.pl20
-rwxr-xr-xCode/Perl/hello.pl3
-rwxr-xr-xCode/Perl/hello_strict.pl5
-rw-r--r--Code/Php/func_abc.php23
-rwxr-xr-xCode/Python/func_abc.py19
-rwxr-xr-xCode/Python/func_slow.py26
-rw-r--r--Code/Readme16
-rwxr-xr-xCode/Ruby/func_abc.rb20
-rwxr-xr-xCode/Ruby/func_slow.rb32
-rwxr-xr-xCode/Shell/func_abc.sh23
-rwxr-xr-xCode/Shell/func_slow.sh35
-rwxr-xr-xCode/Shell/func_waste.sh23
-rw-r--r--Code/Tcl/func_abc.tcl20
-rw-r--r--Code/Tcl/func_slow.tcl29
-rw-r--r--Cpu/Readme3
-rwxr-xr-xCpu/cputypes.d66
-rwxr-xr-xCpu/cpuwalk.d72
-rwxr-xr-xCpu/dispqlen.d52
-rwxr-xr-xCpu/intbycpu.d49
-rwxr-xr-xCpu/intoncpu.d66
-rwxr-xr-xCpu/inttimes.d73
-rwxr-xr-xCpu/loads.d58
-rwxr-xr-xCpu/runocc.d56
-rwxr-xr-xCpu/xcallsbypid.d51
-rw-r--r--Disk/Readme3
-rwxr-xr-xDisk/bitesize.d81
-rwxr-xr-xDisk/diskhits113
-rwxr-xr-xDisk/hotspot.d71
-rwxr-xr-xDisk/iofile.d79
-rwxr-xr-xDisk/iofileb.d59
-rwxr-xr-xDisk/iopending261
-rwxr-xr-xDisk/seeksize.d85
-rw-r--r--Docs/Contents152
l---------Docs/Examples1
-rw-r--r--Docs/Faq126
-rw-r--r--Docs/History249
l---------Docs/Index1
-rw-r--r--Docs/Links30
-rw-r--r--Docs/Maintainer6
l---------Docs/Notes1
-rw-r--r--Docs/Readme21
-rw-r--r--Docs/ToDo7
-rw-r--r--Docs/Who74
-rw-r--r--Docs/cddl1.txt385
-rw-r--r--Docs/oneliners.txt81
-rw-r--r--Examples/Copyright1
-rw-r--r--Examples/Readme21
-rw-r--r--Examples/anonpgpid_example.txt73
-rw-r--r--Examples/bitesize_example.txt74
-rw-r--r--Examples/connections_example.txt23
-rw-r--r--Examples/cpudists_example.txt276
-rw-r--r--Examples/cputimes_example.txt210
-rw-r--r--Examples/cputypes_example.txt40
-rw-r--r--Examples/cpuwalk_example.txt85
-rw-r--r--Examples/crash_example.txt68
-rw-r--r--Examples/creatbyproc_example.txt23
-rw-r--r--Examples/cswstat_example.txt25
-rw-r--r--Examples/dappprof_example.txt71
-rw-r--r--Examples/dapptrace_example.txt215
-rw-r--r--Examples/dexplorer_example.txt95
-rw-r--r--Examples/diskhits_example.txt107
-rw-r--r--Examples/dispqlen_example.txt62
-rw-r--r--Examples/dnlcps_example.txt47
-rw-r--r--Examples/dnlcsnoop_example.txt88
-rw-r--r--Examples/dnlcstat_example.txt40
-rw-r--r--Examples/dtruss_example.txt120
-rw-r--r--Examples/dvmstat_example.txt91
-rw-r--r--Examples/errinfo_example.txt90
-rw-r--r--Examples/execsnoop_example.txt78
-rw-r--r--Examples/fddist_example.txt38
-rw-r--r--Examples/filebyproc_example.txt27
-rw-r--r--Examples/fspaging_example.txt32
-rw-r--r--Examples/fsrw_example.txt129
-rw-r--r--Examples/guess_example.txt39
-rw-r--r--Examples/hotkernel_example.txt153
-rw-r--r--Examples/hotspot_example.txt34
-rw-r--r--Examples/hotuser_example.txt107
-rw-r--r--Examples/httpdstat_example.txt36
-rw-r--r--Examples/icmpstat_example.txt29
-rw-r--r--Examples/intbycpu_example.txt11
-rw-r--r--Examples/intoncpu_example.txt93
-rw-r--r--Examples/inttimes_example.txt18
-rw-r--r--Examples/iofile_example.txt35
-rw-r--r--Examples/iofileb_example.txt23
-rw-r--r--Examples/iopattern_example.txt57
-rw-r--r--Examples/iopending_example.txt126
-rw-r--r--Examples/iosnoop_example.txt39
-rw-r--r--Examples/iotop_example.txt142
-rw-r--r--Examples/j_calldist_example.txt247
-rw-r--r--Examples/j_calls_example.txt137
-rw-r--r--Examples/j_calltime_example.txt67
-rw-r--r--Examples/j_classflow_example.txt89
-rw-r--r--Examples/j_cpudist_example.txt252
-rw-r--r--Examples/j_cputime_example.txt75
-rw-r--r--Examples/j_events_example.txt134
-rw-r--r--Examples/j_flow_example.txt1292
-rw-r--r--Examples/j_flowtime_example.txt1287
-rw-r--r--Examples/j_methodcalls_example.txt999
-rw-r--r--Examples/j_objnew_example.txt1460
-rw-r--r--Examples/j_package_example.txt44
-rw-r--r--Examples/j_profile_example.txt209
-rw-r--r--Examples/j_stat_example.txt33
-rw-r--r--Examples/j_syscalls_example.txt165
-rw-r--r--Examples/j_syscolors_example.txt1550
-rw-r--r--Examples/j_thread_example.txt20
-rw-r--r--Examples/j_who_example.txt17
-rw-r--r--Examples/js_calldist_example.txt110
-rw-r--r--Examples/js_calls_example.txt312
-rw-r--r--Examples/js_calltime_example.txt60
-rw-r--r--Examples/js_cpudist_example.txt112
-rw-r--r--Examples/js_cputime_example.txt69
-rw-r--r--Examples/js_execs_example.txt15
-rw-r--r--Examples/js_flow_example.txt41
-rw-r--r--Examples/js_flowinfo_example.txt42
-rw-r--r--Examples/js_flowtime_example.txt42
-rw-r--r--Examples/js_objcpu_example.txt317
-rw-r--r--Examples/js_objgc_example.txt230
-rw-r--r--Examples/js_objnew_example.txt100
-rw-r--r--Examples/js_stat_example.txt35
-rw-r--r--Examples/js_who_example.txt59
-rw-r--r--Examples/kill_example.txt12
-rw-r--r--Examples/kstat_types_example.txt1358
-rw-r--r--Examples/lastwords_example.txt81
-rw-r--r--Examples/loads_example.txt19
-rw-r--r--Examples/lockbydist_example.txt114
-rw-r--r--Examples/lockbyproc_example.txt42
-rw-r--r--Examples/minfbypid_example.txt20
-rw-r--r--Examples/minfbyproc_example.txt14
-rw-r--r--Examples/mmapfiles_example.txt109
-rw-r--r--Examples/modcalls_example.txt47
-rw-r--r--Examples/newproc_example.txt19
-rw-r--r--Examples/nfswizard_example.txt67
-rw-r--r--Examples/oneliners_examples.txt307
-rw-r--r--Examples/opensnoop_example.txt110
-rw-r--r--Examples/pathopens_example.txt32
-rw-r--r--Examples/pfilestat_example.txt200
-rw-r--r--Examples/pgpginbypid_example.txt14
-rw-r--r--Examples/pgpginbyproc_example.txt13
-rw-r--r--Examples/php_calldist_example.txt84
-rw-r--r--Examples/php_calltime_example.txt51
-rw-r--r--Examples/php_cpudist_example.txt84
-rw-r--r--Examples/php_cputime_example.txt58
-rw-r--r--Examples/php_flow_example.txt36
-rw-r--r--Examples/php_flowinfo_example.txt40
-rw-r--r--Examples/php_flowtime_example.txt41
-rw-r--r--Examples/php_funccalls_example.txt17
-rw-r--r--Examples/php_malloc_example.txt23
-rw-r--r--Examples/php_syscalls_example.txt22
-rw-r--r--Examples/php_syscolors_example.txt63
-rw-r--r--Examples/php_who_example.txt10
-rw-r--r--Examples/pidpersec_example.txt33
-rw-r--r--Examples/pl_calldist_example.txt456
-rw-r--r--Examples/pl_calltime_example.txt150
-rw-r--r--Examples/pl_cpudist_example.txt470
-rw-r--r--Examples/pl_cputime_example.txt151
-rw-r--r--Examples/pl_flow_example.txt179
-rw-r--r--Examples/pl_flowinfo_example.txt188
-rw-r--r--Examples/pl_flowtime_example.txt199
-rw-r--r--Examples/pl_malloc_example.txt79
-rw-r--r--Examples/pl_subcalls_example.txt53
-rw-r--r--Examples/pl_syscalls_example.txt50
-rw-r--r--Examples/pl_syscolors_example.txt183
-rw-r--r--Examples/pl_who_example.txt41
-rw-r--r--Examples/priclass_example.txt82
-rw-r--r--Examples/pridist_example.txt238
-rw-r--r--Examples/procsystime_example.txt149
-rw-r--r--Examples/putnexts_example.txt520
-rw-r--r--Examples/py_calldist_example.txt966
-rw-r--r--Examples/py_calltime_example.txt255
-rw-r--r--Examples/py_cpudist_example.txt966
-rw-r--r--Examples/py_cputime_example.txt262
-rw-r--r--Examples/py_flow_example.txt485
-rw-r--r--Examples/py_flowinfo_example.txt485
-rw-r--r--Examples/py_flowtime_example.txt487
-rw-r--r--Examples/py_funccalls_example.txt89
-rw-r--r--Examples/py_malloc_example.txt508
-rw-r--r--Examples/py_mallocstk_example.txt314
-rw-r--r--Examples/py_profile_example.txt399
-rw-r--r--Examples/py_syscalls_example.txt129
-rw-r--r--Examples/py_syscolors_example.txt584
-rw-r--r--Examples/py_who_example.txt34
-rw-r--r--Examples/rb_calldist_example.txt153
-rw-r--r--Examples/rb_calls_example.txt29
-rw-r--r--Examples/rb_calltime_example.txt77
-rw-r--r--Examples/rb_cpudist_example.txt199
-rw-r--r--Examples/rb_cputime_example.txt81
-rw-r--r--Examples/rb_flow_example.txt54
-rw-r--r--Examples/rb_flowinfo_example.txt54
-rw-r--r--Examples/rb_flowtime_example.txt56
-rw-r--r--Examples/rb_funccalls_example.txt25
-rw-r--r--Examples/rb_lines_example.txt30
-rw-r--r--Examples/rb_malloc_example.txt120
-rw-r--r--Examples/rb_objcpu_example.txt51
-rw-r--r--Examples/rb_objnew_example.txt21
-rw-r--r--Examples/rb_stat_example.txt22
-rw-r--r--Examples/rb_syscalls_example.txt54
-rw-r--r--Examples/rb_syscolors_example.txt331
-rw-r--r--Examples/rb_who_example.txt20
-rw-r--r--Examples/readbytes_example.txt22
-rw-r--r--Examples/readdist_example.txt35
-rw-r--r--Examples/rfileio_example.txt94
-rw-r--r--Examples/rfsio_example.txt82
-rw-r--r--Examples/runocc_example.txt53
-rw-r--r--Examples/rwbbypid_example.txt26
-rw-r--r--Examples/rwbypid_example.txt19
-rw-r--r--Examples/rwbytype_example.txt37
-rw-r--r--Examples/rwsnoop_example.txt98
-rw-r--r--Examples/rwtop_example.txt59
-rw-r--r--Examples/sampleproc_example.txt62
-rw-r--r--Examples/sar-c_example.txt55
-rw-r--r--Examples/seeksize_example.txt197
-rw-r--r--Examples/setuids_example.txt28
-rw-r--r--Examples/sh_calldist_example.txt309
-rw-r--r--Examples/sh_calls_example.txt60
-rw-r--r--Examples/sh_calltime_example.txt144
-rw-r--r--Examples/sh_cpudist_example.txt92
-rw-r--r--Examples/sh_cputime_example.txt131
-rw-r--r--Examples/sh_flow_example.txt129
-rw-r--r--Examples/sh_flowinfo_example.txt242
-rw-r--r--Examples/sh_flowtime_example.txt131
-rw-r--r--Examples/sh_lines_example.txt32
-rw-r--r--Examples/sh_pidcolors_example.txt574
-rw-r--r--Examples/sh_stat_example.txt44
-rw-r--r--Examples/sh_syscalls_example.txt59
-rw-r--r--Examples/sh_syscolors_example.txt328
-rw-r--r--Examples/sh_wasted_example.txt45
-rw-r--r--Examples/sh_who_example.txt45
-rw-r--r--Examples/shellsnoop_example.txt112
-rw-r--r--Examples/shortlived_example.txt57
-rw-r--r--Examples/sigdist_example.txt18
-rw-r--r--Examples/stacksize_example.txt87
-rw-r--r--Examples/statsnoop_example.txt94
-rw-r--r--Examples/swapinfo_example.txt22
-rw-r--r--Examples/sysbypid_example.txt45
-rw-r--r--Examples/syscallbypid_example.txt50
-rw-r--r--Examples/syscallbyproc_example.txt17
-rw-r--r--Examples/syscallbysysc_example.txt24
-rw-r--r--Examples/tcl_calldist_example.txt166
-rw-r--r--Examples/tcl_calls_example.txt41
-rw-r--r--Examples/tcl_calltime_example.txt61
-rw-r--r--Examples/tcl_cpudist_example.txt164
-rw-r--r--Examples/tcl_cputime_example.txt67
-rw-r--r--Examples/tcl_flow_example.txt195
-rw-r--r--Examples/tcl_flowtime_example.txt197
-rw-r--r--Examples/tcl_ins_example.txt46
-rw-r--r--Examples/tcl_insflow_example.txt997
-rw-r--r--Examples/tcl_proccalls_example.txt17
-rw-r--r--Examples/tcl_procflow_example.txt29
-rw-r--r--Examples/tcl_stat_example.txt24
-rw-r--r--Examples/tcl_syscalls_example.txt66
-rw-r--r--Examples/tcl_syscolors_example.txt563
-rw-r--r--Examples/tcl_who_example.txt17
-rw-r--r--Examples/tcpsnoop_d_example.txt41
-rw-r--r--Examples/tcpsnoop_example.txt61
l---------Examples/tcpsnoop_snv_d_example.txt1
l---------Examples/tcpsnoop_snv_example.txt1
-rw-r--r--Examples/tcpstat_example.txt22
-rw-r--r--Examples/tcptop_example.txt28
l---------Examples/tcptop_snv_example.txt1
-rw-r--r--Examples/tcpwdist_example.txt70
-rw-r--r--Examples/threaded_example.txt108
-rw-r--r--Examples/topsyscall_example.txt65
-rw-r--r--Examples/topsysproc_example.txt56
-rw-r--r--Examples/udpstat_example.txt39
-rw-r--r--Examples/uname-a_example.txt15
-rw-r--r--Examples/vmbypid_example.txt32
-rw-r--r--Examples/vmstat-p_example.txt51
-rw-r--r--Examples/vmstat_example.txt45
-rw-r--r--Examples/vopstat_example.txt89
-rw-r--r--Examples/weblatency_example.txt127
-rw-r--r--Examples/whatexec_example.txt18
-rw-r--r--Examples/woof_example.txt28
-rw-r--r--Examples/wpm_example.txt57
-rw-r--r--Examples/writebytes_example.txt26
-rw-r--r--Examples/writedist_example.txt38
-rw-r--r--Examples/xcallsbypid_example.txt17
-rw-r--r--Examples/xvmstat_example.txt44
-rw-r--r--Examples/zvmstat_example.txt34
-rw-r--r--FS/Readme3
-rwxr-xr-xFS/fspaging.d154
-rwxr-xr-xFS/fsrw.d149
-rwxr-xr-xFS/rfileio.d91
-rwxr-xr-xFS/rfsio.d98
-rwxr-xr-xFS/vopstat304
-rw-r--r--Guide91
-rw-r--r--Include/Readme18
-rwxr-xr-xInclude/test.ksh68
-rw-r--r--Include/time.h38
-rw-r--r--Include/tostr.h89
-rw-r--r--Java/Readme17
-rwxr-xr-xJava/j_calldist.d116
-rwxr-xr-xJava/j_calls.d113
-rwxr-xr-xJava/j_calltime.d129
-rwxr-xr-xJava/j_classflow.d100
-rwxr-xr-xJava/j_cpudist.d116
-rwxr-xr-xJava/j_cputime.d129
-rwxr-xr-xJava/j_events.d56
-rwxr-xr-xJava/j_flow.d87
-rwxr-xr-xJava/j_flowtime.d101
-rwxr-xr-xJava/j_methodcalls.d60
-rwxr-xr-xJava/j_objnew.d61
-rwxr-xr-xJava/j_package.d56
-rwxr-xr-xJava/j_profile.d78
-rwxr-xr-xJava/j_stat.d148
-rwxr-xr-xJava/j_syscalls.d68
-rwxr-xr-xJava/j_syscolors.d135
-rwxr-xr-xJava/j_thread.d64
-rwxr-xr-xJava/j_who.d58
-rw-r--r--JavaScript/Readme54
-rwxr-xr-xJavaScript/js_calldist.d101
-rwxr-xr-xJavaScript/js_calls.d76
-rwxr-xr-xJavaScript/js_calltime.d115
-rwxr-xr-xJavaScript/js_cpudist.d101
-rwxr-xr-xJavaScript/js_cputime.d115
-rwxr-xr-xJavaScript/js_execs.d51
-rwxr-xr-xJavaScript/js_flow.d69
-rwxr-xr-xJavaScript/js_flowinfo.d86
-rwxr-xr-xJavaScript/js_flowtime.d84
-rwxr-xr-xJavaScript/js_objcpu.d61
-rwxr-xr-xJavaScript/js_objgc.d89
-rwxr-xr-xJavaScript/js_objnew.d55
-rwxr-xr-xJavaScript/js_stat.d120
-rwxr-xr-xJavaScript/js_who.d56
-rw-r--r--Kernel/Readme3
-rwxr-xr-xKernel/cpudists184
-rwxr-xr-xKernel/cputimes203
-rwxr-xr-xKernel/cswstat.d74
-rwxr-xr-xKernel/dnlcps.d68
-rwxr-xr-xKernel/dnlcsnoop.d92
-rwxr-xr-xKernel/dnlcstat162
-rwxr-xr-xKernel/kstat_types.d66
-rwxr-xr-xKernel/modcalls.d10
-rwxr-xr-xKernel/priclass.d67
-rwxr-xr-xKernel/pridist.d66
-rwxr-xr-xKernel/putnexts.d38
-rwxr-xr-xKernel/whatexec.d79
l---------License1
-rwxr-xr-xLocks/lockbydist.d10
-rwxr-xr-xLocks/lockbyproc.d10
-rw-r--r--Man/Readme40
-rw-r--r--Man/man1m/anonpgpid.d.1m54
-rw-r--r--Man/man1m/bitesize.d.1m57
-rw-r--r--Man/man1m/connections.1m77
-rw-r--r--Man/man1m/cpudists.1m86
-rw-r--r--Man/man1m/cputimes.1m87
-rw-r--r--Man/man1m/cputypes.d.1m54
-rw-r--r--Man/man1m/cpuwalk.d.1m53
-rw-r--r--Man/man1m/crash.d.1m81
-rw-r--r--Man/man1m/creatbyproc.d.1m55
-rw-r--r--Man/man1m/cswstat.d.1m51
-rw-r--r--Man/man1m/dappprof.1m98
-rw-r--r--Man/man1m/dapptrace.1m112
-rw-r--r--Man/man1m/dexplorer.1m64
-rw-r--r--Man/man1m/diskhits.1m46
-rw-r--r--Man/man1m/dispqlen.d.1m36
-rw-r--r--Man/man1m/dnlcps.d.1m51
-rw-r--r--Man/man1m/dnlcsnoop.d.1m52
-rw-r--r--Man/man1m/dnlcstat.1m57
-rw-r--r--Man/man1m/dtruss.1m123
-rw-r--r--Man/man1m/dvmstat.1m93
-rw-r--r--Man/man1m/errinfo.1m85
-rw-r--r--Man/man1m/execsnoop.1m108
-rw-r--r--Man/man1m/fddist.1m63
-rw-r--r--Man/man1m/filebyproc.d.1m56
-rw-r--r--Man/man1m/fspaging.d.1m88
-rw-r--r--Man/man1m/fsrw.d.1m80
-rw-r--r--Man/man1m/guess.d.1m37
-rw-r--r--Man/man1m/hotkernel.1m39
-rw-r--r--Man/man1m/hotspot.d.1m51
-rw-r--r--Man/man1m/hotuser.1m44
-rw-r--r--Man/man1m/httpdstat.d.1m67
-rw-r--r--Man/man1m/icmpstat.d.1m47
-rw-r--r--Man/man1m/intbycpu.d.1m48
-rw-r--r--Man/man1m/intoncpu.d.1m42
-rw-r--r--Man/man1m/inttimes.d.1m43
-rw-r--r--Man/man1m/iofile.d.1m49
-rw-r--r--Man/man1m/iofileb.d.1m46
-rw-r--r--Man/man1m/iopattern.1m112
-rw-r--r--Man/man1m/iopending.1m89
-rw-r--r--Man/man1m/iosnoop.1m167
-rw-r--r--Man/man1m/iotop.1m154
-rw-r--r--Man/man1m/j_calldist.d.1m48
-rw-r--r--Man/man1m/j_calls.d.1m57
-rw-r--r--Man/man1m/j_calltime.d.1m51
-rw-r--r--Man/man1m/j_classflow.d.1m63
-rw-r--r--Man/man1m/j_cpudist.d.1m48
-rw-r--r--Man/man1m/j_cputime.d.1m51
-rw-r--r--Man/man1m/j_events.d.1m46
-rw-r--r--Man/man1m/j_flow.d.1m63
-rw-r--r--Man/man1m/j_flowtime.d.1m69
-rw-r--r--Man/man1m/j_methodcalls.d.1m45
-rw-r--r--Man/man1m/j_objnew.d.1m45
-rw-r--r--Man/man1m/j_package.d.1m44
-rw-r--r--Man/man1m/j_profile.d.1m52
-rw-r--r--Man/man1m/j_stat.d.1m68
-rw-r--r--Man/man1m/j_syscalls.d.1m48
-rw-r--r--Man/man1m/j_syscolors.d.1m65
-rw-r--r--Man/man1m/j_thread.d.1m54
-rw-r--r--Man/man1m/j_who.d.1m51
-rw-r--r--Man/man1m/js_calldist.d.1m46
-rw-r--r--Man/man1m/js_calls.d.1m49
-rw-r--r--Man/man1m/js_calltime.d.1m49
-rw-r--r--Man/man1m/js_cpudist.d.1m46
-rw-r--r--Man/man1m/js_cputime.d.1m49
-rw-r--r--Man/man1m/js_execs.d.1m46
-rw-r--r--Man/man1m/js_flow.d.1m59
-rw-r--r--Man/man1m/js_flowinfo.d.1m68
-rw-r--r--Man/man1m/js_flowtime.d.1m62
-rw-r--r--Man/man1m/js_objcpu.d.1m36
-rw-r--r--Man/man1m/js_objgc.d.1m60
-rw-r--r--Man/man1m/js_objnew.d.1m46
-rw-r--r--Man/man1m/js_stat.d.1m52
-rw-r--r--Man/man1m/js_who.d.1m49
-rw-r--r--Man/man1m/kill.d.1m53
-rw-r--r--Man/man1m/kstat_types.d.1m50
-rw-r--r--Man/man1m/lastwords.1m56
-rw-r--r--Man/man1m/loads.d.1m38
-rw-r--r--Man/man1m/lockbydist.d.1m54
-rw-r--r--Man/man1m/lockbyproc.d.1m47
-rw-r--r--Man/man1m/minfbypid.d.1m46
-rw-r--r--Man/man1m/minfbyproc.d.1m47
-rw-r--r--Man/man1m/mmapfiles.d.1m42
-rw-r--r--Man/man1m/modcalls.d.1m50
-rw-r--r--Man/man1m/newproc.d.1m54
-rw-r--r--Man/man1m/nfswizard.d.1m36
-rw-r--r--Man/man1m/opensnoop.1m139
-rw-r--r--Man/man1m/pathopens.d.1m38
-rw-r--r--Man/man1m/pfilestat.1m87
-rw-r--r--Man/man1m/pgpginbypid.d.1m47
-rw-r--r--Man/man1m/pgpginbyproc.d.1m50
-rw-r--r--Man/man1m/php_calldist.d.1m49
-rw-r--r--Man/man1m/php_calltime.d.1m49
-rw-r--r--Man/man1m/php_cpudist.d.1m49
-rw-r--r--Man/man1m/php_cputime.d.1m49
-rw-r--r--Man/man1m/php_flow.d.1m60
-rw-r--r--Man/man1m/php_flowinfo.d.1m68
-rw-r--r--Man/man1m/php_flowtime.d.1m65
-rw-r--r--Man/man1m/php_funccalls.d.1m43
-rw-r--r--Man/man1m/php_malloc.d.1m39
-rw-r--r--Man/man1m/php_syscalls.d.1m54
-rw-r--r--Man/man1m/php_syscolors.d.1m61
-rw-r--r--Man/man1m/php_who.d.1m49
-rw-r--r--Man/man1m/pidpersec.d.1m42
-rw-r--r--Man/man1m/pl_calldist.d.1m49
-rw-r--r--Man/man1m/pl_calltime.d.1m49
-rw-r--r--Man/man1m/pl_cpudist.d.1m49
-rw-r--r--Man/man1m/pl_cputime.d.1m49
-rw-r--r--Man/man1m/pl_flow.d.1m60
-rw-r--r--Man/man1m/pl_flowinfo.d.1m68
-rw-r--r--Man/man1m/pl_flowtime.d.1m65
-rw-r--r--Man/man1m/pl_malloc.d.1m39
-rw-r--r--Man/man1m/pl_subcalls.d.1m43
-rw-r--r--Man/man1m/pl_syscalls.d.1m49
-rw-r--r--Man/man1m/pl_syscolors.d.1m61
-rw-r--r--Man/man1m/pl_who.d.1m49
-rw-r--r--Man/man1m/priclass.d.1m66
-rw-r--r--Man/man1m/pridist.d.1m55
-rw-r--r--Man/man1m/procsystime.1m108
-rw-r--r--Man/man1m/putnexts.d.1m27
-rw-r--r--Man/man1m/py_calldist.d.1m49
-rw-r--r--Man/man1m/py_calltime.d.1m49
-rw-r--r--Man/man1m/py_cpudist.d.1m49
-rw-r--r--Man/man1m/py_cputime.d.1m49
-rw-r--r--Man/man1m/py_flow.d.1m60
-rw-r--r--Man/man1m/py_flowinfo.d.1m68
-rw-r--r--Man/man1m/py_flowtime.d.1m65
-rw-r--r--Man/man1m/py_funccalls.d.1m43
-rw-r--r--Man/man1m/py_malloc.d.1m39
-rw-r--r--Man/man1m/py_mallocstk.d.1m33
-rw-r--r--Man/man1m/py_profile.d.1m54
-rw-r--r--Man/man1m/py_syscalls.d.1m49
-rw-r--r--Man/man1m/py_syscolors.d.1m61
-rw-r--r--Man/man1m/py_who.d.1m49
-rw-r--r--Man/man1m/rb_calldist.d.1m49
-rw-r--r--Man/man1m/rb_calls.d.1m49
-rw-r--r--Man/man1m/rb_calltime.d.1m49
-rw-r--r--Man/man1m/rb_cpudist.d.1m49
-rw-r--r--Man/man1m/rb_cputime.d.1m49
-rw-r--r--Man/man1m/rb_flow.d.1m59
-rw-r--r--Man/man1m/rb_flowinfo.d.1m68
-rw-r--r--Man/man1m/rb_flowtime.d.1m62
-rw-r--r--Man/man1m/rb_funccalls.d.1m46
-rw-r--r--Man/man1m/rb_lines.d.1m46
-rw-r--r--Man/man1m/rb_malloc.d.1m47
-rw-r--r--Man/man1m/rb_objcpu.d.1m36
-rw-r--r--Man/man1m/rb_objnew.d.1m46
-rw-r--r--Man/man1m/rb_stat.d.1m66
-rw-r--r--Man/man1m/rb_syscalls.d.1m49
-rw-r--r--Man/man1m/rb_syscolors.d.1m61
-rw-r--r--Man/man1m/rb_who.d.1m49
-rw-r--r--Man/man1m/readbytes.d.1m47
-rw-r--r--Man/man1m/readdist.d.1m54
-rw-r--r--Man/man1m/rfileio.d.1m41
-rw-r--r--Man/man1m/rfsio.d.1m41
-rw-r--r--Man/man1m/runocc.d.1m46
-rw-r--r--Man/man1m/rwbbypid.d.1m48
-rw-r--r--Man/man1m/rwbypid.d.1m48
-rw-r--r--Man/man1m/rwbytype.d.1m54
-rw-r--r--Man/man1m/rwsnoop.1m104
-rw-r--r--Man/man1m/rwtop.1m115
-rw-r--r--Man/man1m/sampleproc.1m55
-rw-r--r--Man/man1m/sar-c.d.1m62
-rw-r--r--Man/man1m/seeksize.d.1m51
-rw-r--r--Man/man1m/setuids.d.1m53
-rw-r--r--Man/man1m/sh_calldist.d.1m49
-rw-r--r--Man/man1m/sh_calls.d.1m49
-rw-r--r--Man/man1m/sh_calltime.d.1m49
-rw-r--r--Man/man1m/sh_cpudist.d.1m49
-rw-r--r--Man/man1m/sh_cputime.d.1m49
-rw-r--r--Man/man1m/sh_flow.d.1m66
-rw-r--r--Man/man1m/sh_flowinfo.d.1m62
-rw-r--r--Man/man1m/sh_flowtime.d.1m76
-rw-r--r--Man/man1m/sh_lines.d.1m46
-rw-r--r--Man/man1m/sh_pidcolors.d.1m70
-rw-r--r--Man/man1m/sh_stat.d.1m59
-rw-r--r--Man/man1m/sh_syscalls.d.1m49
-rw-r--r--Man/man1m/sh_syscolors.d.1m63
-rw-r--r--Man/man1m/sh_wasted.d.1m49
-rw-r--r--Man/man1m/sh_who.d.1m49
-rw-r--r--Man/man1m/shellsnoop.1m99
-rw-r--r--Man/man1m/shortlived.d.1m37
-rw-r--r--Man/man1m/sigdist.d.1m50
-rw-r--r--Man/man1m/stacksize.d.1m42
-rw-r--r--Man/man1m/statsnoop.1m140
-rw-r--r--Man/man1m/swapinfo.d.1m88
-rw-r--r--Man/man1m/sysbypid.d.1m50
-rw-r--r--Man/man1m/syscallbypid.d.1m50
-rw-r--r--Man/man1m/syscallbyproc.d.1m50
-rw-r--r--Man/man1m/syscallbysysc.d.1m47
-rw-r--r--Man/man1m/tcl_calldist.d.1m47
-rw-r--r--Man/man1m/tcl_calls.d.1m68
-rw-r--r--Man/man1m/tcl_calltime.d.1m50
-rw-r--r--Man/man1m/tcl_cpudist.d.1m47
-rw-r--r--Man/man1m/tcl_cputime.d.1m50
-rw-r--r--Man/man1m/tcl_flow.d.1m66
-rw-r--r--Man/man1m/tcl_flowtime.d.1m69
-rw-r--r--Man/man1m/tcl_ins.d.1m50
-rw-r--r--Man/man1m/tcl_insflow.d.1m69
-rw-r--r--Man/man1m/tcl_proccalls.d.1m44
-rw-r--r--Man/man1m/tcl_procflow.d.1m60
-rw-r--r--Man/man1m/tcl_stat.d.1m61
-rw-r--r--Man/man1m/tcl_syscalls.d.1m47
-rw-r--r--Man/man1m/tcl_syscolors.d.1m59
-rw-r--r--Man/man1m/tcl_who.d.1m54
-rw-r--r--Man/man1m/tcpsnoop.1m116
-rw-r--r--Man/man1m/tcpsnoop.d.1m68
-rw-r--r--Man/man1m/tcpsnoop_snv.1m116
-rw-r--r--Man/man1m/tcpsnoop_snv.d.1m68
-rw-r--r--Man/man1m/tcpstat.d.1m58
-rw-r--r--Man/man1m/tcptop.1m111
-rw-r--r--Man/man1m/tcptop_snv.1m111
-rw-r--r--Man/man1m/tcpwdist.d.1m60
-rw-r--r--Man/man1m/threaded.d.1m50
-rw-r--r--Man/man1m/topsyscall.1m73
-rw-r--r--Man/man1m/topsysproc.1m75
-rw-r--r--Man/man1m/udpstat.d.1m55
-rw-r--r--Man/man1m/uname-a.d.1m35
-rw-r--r--Man/man1m/vmbypid.d.1m50
-rw-r--r--Man/man1m/vmstat-p.d.1m85
-rw-r--r--Man/man1m/vmstat.d.1m79
-rw-r--r--Man/man1m/vopstat.1m77
-rw-r--r--Man/man1m/weblatency.d.1m63
-rw-r--r--Man/man1m/whatexec.d.1m53
-rw-r--r--Man/man1m/woof.d.1m46
-rw-r--r--Man/man1m/wpm.d.1m34
-rw-r--r--Man/man1m/writebytes.d.1m47
-rw-r--r--Man/man1m/writedist.d.1m54
-rw-r--r--Man/man1m/xcallsbypid.d.1m46
-rw-r--r--Man/man1m/xvmstat.1m104
-rw-r--r--Man/man1m/zvmstat.1m101
-rw-r--r--Mem/Readme3
-rwxr-xr-xMem/anonpgpid.d75
-rwxr-xr-xMem/minfbypid.d57
-rwxr-xr-xMem/minfbyproc.d10
-rwxr-xr-xMem/pgpginbypid.d53
-rwxr-xr-xMem/pgpginbyproc.d10
-rwxr-xr-xMem/swapinfo.d149
-rwxr-xr-xMem/vmbypid.d54
-rwxr-xr-xMem/vmstat-p.d155
-rwxr-xr-xMem/vmstat.d137
-rwxr-xr-xMem/xvmstat217
-rw-r--r--Misc/Readme5
-rwxr-xr-xMisc/guess.d118
-rwxr-xr-xMisc/woof.d63
-rwxr-xr-xMisc/wpm.d143
-rw-r--r--Net/Readme4
-rwxr-xr-xNet/connections178
-rwxr-xr-xNet/icmpstat.d61
-rwxr-xr-xNet/tcpsnoop581
-rwxr-xr-xNet/tcpsnoop.d424
-rwxr-xr-xNet/tcpsnoop_snv583
-rwxr-xr-xNet/tcpsnoop_snv.d426
-rwxr-xr-xNet/tcpstat.d91
-rwxr-xr-xNet/tcptop579
-rwxr-xr-xNet/tcptop_snv581
-rwxr-xr-xNet/tcpwdist.d82
-rwxr-xr-xNet/udpstat.d92
-rw-r--r--Notes/ALLcolors_notes.txt127
-rw-r--r--Notes/ALLelapsed_notes.txt46
-rw-r--r--Notes/ALLexclusive_notes.txt78
-rw-r--r--Notes/ALLfbt_notes.txt77
-rw-r--r--Notes/ALLflow_notes.txt64
-rw-r--r--Notes/ALLinclusive_notes.txt74
-rw-r--r--Notes/ALLjava_notes.txt35
-rw-r--r--Notes/ALLoncpu_notes.txt42
-rw-r--r--Notes/ALLoverhead.txt96
-rw-r--r--Notes/ALLperl_notes.txt44
-rw-r--r--Notes/ALLsnoop_notes.txt94
-rw-r--r--Notes/Readme21
-rw-r--r--Notes/cputimes_notes.txt138
-rw-r--r--Notes/dappprof_notes.txt14
-rw-r--r--Notes/dapptrace_notes.txt19
-rw-r--r--Notes/dtruss_notes.txt97
-rw-r--r--Notes/iosnoop_notes.txt99
-rw-r--r--Notes/iotop_notes.txt48
-rw-r--r--Notes/procsystime_notes.txt14
-rw-r--r--Perl/Readme38
-rwxr-xr-xPerl/pl_calldist.d82
-rwxr-xr-xPerl/pl_calltime.d89
-rwxr-xr-xPerl/pl_cpudist.d82
-rwxr-xr-xPerl/pl_cputime.d89
-rwxr-xr-xPerl/pl_flow.d70
-rwxr-xr-xPerl/pl_flowinfo.d86
-rwxr-xr-xPerl/pl_flowtime.d88
-rwxr-xr-xPerl/pl_malloc.d81
-rwxr-xr-xPerl/pl_subcalls.d55
-rwxr-xr-xPerl/pl_syscalls.d65
-rwxr-xr-xPerl/pl_syscolors.d119
-rwxr-xr-xPerl/pl_who.d56
-rw-r--r--Php/Readme39
-rwxr-xr-xPhp/php_calldist.d83
-rwxr-xr-xPhp/php_calltime.d90
-rwxr-xr-xPhp/php_cpudist.d83
-rwxr-xr-xPhp/php_cputime.d90
-rwxr-xr-xPhp/php_flow.d72
-rwxr-xr-xPhp/php_flowinfo.d88
-rwxr-xr-xPhp/php_flowtime.d91
-rwxr-xr-xPhp/php_funccalls.d56
-rwxr-xr-xPhp/php_malloc.d82
-rwxr-xr-xPhp/php_syscalls.d75
-rwxr-xr-xPhp/php_syscolors.d116
-rwxr-xr-xPhp/php_who.d56
-rw-r--r--Proc/Readme3
-rwxr-xr-xProc/crash.d181
-rwxr-xr-xProc/creatbyproc.d10
-rwxr-xr-xProc/dappprof239
-rwxr-xr-xProc/dapptrace259
-rwxr-xr-xProc/fddist116
-rwxr-xr-xProc/filebyproc.d10
-rwxr-xr-xProc/kill.d63
-rwxr-xr-xProc/lastwords90
-rwxr-xr-xProc/mmapfiles.d62
-rwxr-xr-xProc/newproc.d10
-rwxr-xr-xProc/pathopens.d100
-rwxr-xr-xProc/pfilestat282
-rwxr-xr-xProc/pidpersec.d57
-rwxr-xr-xProc/readbytes.d10
-rwxr-xr-xProc/readdist.d10
-rwxr-xr-xProc/rwbbypid.d61
-rwxr-xr-xProc/rwbypid.d61
-rwxr-xr-xProc/rwbytype.d101
-rwxr-xr-xProc/sampleproc105
-rwxr-xr-xProc/shortlived.d118
-rwxr-xr-xProc/sigdist.d61
-rwxr-xr-xProc/stacksize.d95
-rwxr-xr-xProc/sysbypid.d53
-rwxr-xr-xProc/syscallbypid.d54
-rwxr-xr-xProc/syscallbyproc.d10
-rwxr-xr-xProc/threaded.d66
-rwxr-xr-xProc/topsysproc121
-rwxr-xr-xProc/writebytes.d10
-rwxr-xr-xProc/writedist.d10
-rw-r--r--Python/Readme28
-rwxr-xr-xPython/py_calldist.d82
-rwxr-xr-xPython/py_calltime.d89
-rwxr-xr-xPython/py_cpudist.d82
-rwxr-xr-xPython/py_cputime.d89
-rwxr-xr-xPython/py_flow.d70
-rwxr-xr-xPython/py_flowinfo.d86
-rwxr-xr-xPython/py_flowtime.d89
-rwxr-xr-xPython/py_funccalls.d55
-rwxr-xr-xPython/py_malloc.d81
-rwxr-xr-xPython/py_mallocstk.d49
-rwxr-xr-xPython/py_profile.d79
-rwxr-xr-xPython/py_syscalls.d63
-rwxr-xr-xPython/py_syscolors.d116
-rwxr-xr-xPython/py_who.d56
l---------README1
-rw-r--r--Ruby/Readme31
-rwxr-xr-xRuby/rb_calldist.d120
-rwxr-xr-xRuby/rb_calls.d87
-rwxr-xr-xRuby/rb_calltime.d129
-rwxr-xr-xRuby/rb_cpudist.d120
-rwxr-xr-xRuby/rb_cputime.d129
-rwxr-xr-xRuby/rb_flow.d72
-rwxr-xr-xRuby/rb_flowinfo.d88
-rwxr-xr-xRuby/rb_flowtime.d84
-rwxr-xr-xRuby/rb_funccalls.d57
-rwxr-xr-xRuby/rb_lines.d55
-rwxr-xr-xRuby/rb_malloc.d80
-rwxr-xr-xRuby/rb_objcpu.d61
-rwxr-xr-xRuby/rb_objnew.d55
-rwxr-xr-xRuby/rb_stat.d146
-rwxr-xr-xRuby/rb_syscalls.d66
-rwxr-xr-xRuby/rb_syscolors.d133
-rwxr-xr-xRuby/rb_who.d56
-rw-r--r--Shell/Readme35
-rwxr-xr-xShell/sh_calldist.d119
-rwxr-xr-xShell/sh_calls.d72
-rwxr-xr-xShell/sh_calltime.d136
-rwxr-xr-xShell/sh_cpudist.d142
-rwxr-xr-xShell/sh_cputime.d158
-rwxr-xr-xShell/sh_flow.d85
-rwxr-xr-xShell/sh_flowinfo.d152
-rwxr-xr-xShell/sh_flowtime.d118
-rwxr-xr-xShell/sh_lines.d55
-rwxr-xr-xShell/sh_pidcolors.d203
-rwxr-xr-xShell/sh_stat.d133
-rwxr-xr-xShell/sh_syscalls.d83
-rwxr-xr-xShell/sh_syscolors.d169
-rwxr-xr-xShell/sh_wasted.d101
-rwxr-xr-xShell/sh_who.d56
-rw-r--r--Snippits/Readme11
-rw-r--r--Snippits/fd2pathname.txt32
-rw-r--r--System/Readme3
-rwxr-xr-xSystem/sar-c.d101
-rwxr-xr-xSystem/syscallbysysc.d10
-rwxr-xr-xSystem/topsyscall184
-rwxr-xr-xSystem/uname-a.d53
-rw-r--r--Tcl/Readme39
-rwxr-xr-xTcl/tcl_calldist.d111
-rwxr-xr-xTcl/tcl_calls.d63
-rwxr-xr-xTcl/tcl_calltime.d123
-rwxr-xr-xTcl/tcl_cpudist.d111
-rwxr-xr-xTcl/tcl_cputime.d123
-rwxr-xr-xTcl/tcl_flow.d86
-rwxr-xr-xTcl/tcl_flowtime.d105
-rwxr-xr-xTcl/tcl_ins.d57
-rwxr-xr-xTcl/tcl_insflow.d123
-rwxr-xr-xTcl/tcl_proccalls.d53
-rwxr-xr-xTcl/tcl_procflow.d70
-rwxr-xr-xTcl/tcl_stat.d137
-rwxr-xr-xTcl/tcl_syscalls.d66
-rwxr-xr-xTcl/tcl_syscolors.d139
-rwxr-xr-xTcl/tcl_who.d62
-rw-r--r--User/Readme3
-rwxr-xr-xUser/setuids.d82
-rw-r--r--Version1
-rw-r--r--Zones/Readme3
-rwxr-xr-xZones/zvmstat277
-rwxr-xr-xdexplorer547
-rwxr-xr-xdvmstat250
-rwxr-xr-xerrinfo180
-rwxr-xr-xexecsnoop174
-rwxr-xr-xhotkernel125
-rwxr-xr-xhotuser139
-rwxr-xr-xinstall151
-rwxr-xr-xiopattern277
-rwxr-xr-xiosnoop367
-rwxr-xr-xiotop422
-rwxr-xr-xopensnoop244
-rwxr-xr-xprocsystime233
-rwxr-xr-xrwsnoop234
-rwxr-xr-xrwtop292
-rwxr-xr-xstatsnoop286
1006 files changed, 77925 insertions, 0 deletions
diff --git a/Apps/Readme b/Apps/Readme
new file mode 100644
index 000000000000..3a6812f4bfa2
--- /dev/null
+++ b/Apps/Readme
@@ -0,0 +1,5 @@
+Apps - Specific Application based analysis
+
+ These are DTrace scripts that are written to analyse a particular
+ application or applictaion layer protocol. For example, Apache or NFS
+ scripts would appear here.
diff --git a/Apps/httpdstat.d b/Apps/httpdstat.d
new file mode 100755
index 000000000000..a053482a6c15
--- /dev/null
+++ b/Apps/httpdstat.d
@@ -0,0 +1,132 @@
+#!/usr/sbin/dtrace -s
+/*
+ * httpdstat.d - realtime httpd statistics. Uses DTrace.
+ *
+ * $Id: httpdstat.d 2 2007-08-01 10:01:43Z brendan $
+ *
+ * USAGE: httpdstat.d [interval [count]]
+ *
+ * interval seconds
+ * count number of samples
+ *
+ * FIELDS:
+ * TIME Time, string
+ * NUM Number of connections
+ * GET Number of "GET"s
+ * POST Number of "POST"s
+ * HEAD Number of "HEAD"s
+ * TRACE Number of "TRACE"s
+ *
+ * All of the statistics are printed as a value per interval (not per second).
+ *
+ * NOTE: This version does not process subsequent operations on keepalives.
+ *
+ * IDEA: Ryan Matteson (who first wrote a solution to this).
+ *
+ * COPYRIGHT: Copyright (c) 2005 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 20-Nov-2005 Brendan Gregg Created this.
+ */
+
+#pragma D option quiet
+#pragma D option defaultargs
+
+inline int SCREEN = 21;
+
+/*
+ * Program Start
+ */
+dtrace:::BEGIN
+{
+ num = 0; get = 0; head = 0; post = 0; trac = 0;
+ lines = SCREEN + 1;
+ secs = $1 ? $1 : 1;
+ counts = $2 ? $2 : -1;
+ first = 1;
+}
+
+profile:::tick-1sec
+{
+ secs--;
+}
+
+/*
+ * Print Header
+ */
+dtrace:::BEGIN,
+profile:::tick-1sec
+/first || (secs == 0 && lines > SCREEN)/
+{
+ printf("%-20s %6s %6s %5s %5s %5s\n", "TIME",
+ "NUM", "GET", "POST", "HEAD", "TRACE");
+ lines = 0;
+ first = 0;
+}
+
+/*
+ * Track Accept Events
+ */
+syscall::accept:return
+/execname == "httpd"/
+{
+ self->buf = 1;
+}
+
+syscall::read:entry
+/self->buf/
+{
+ self->buf = arg1;
+}
+
+/*
+ * Tally Data
+ */
+syscall::read:return
+/self->buf && arg0/
+{
+ this->str = (char *)copyin(self->buf, arg0);
+ this->str[4] = '\0';
+ get += stringof(this->str) == "GET " ? 1 : 0;
+ post += stringof(this->str) == "POST" ? 1 : 0;
+ head += stringof(this->str) == "HEAD" ? 1 : 0;
+ trac += stringof(this->str) == "TRAC" ? 1 : 0;
+ num++;
+ self->buf = 0;
+}
+
+/*
+ * Print Output
+ */
+profile:::tick-1sec
+/secs == 0/
+{
+ printf("%-20Y %6d %6d %5d %5d %5d\n", walltimestamp,
+ num, get, post, head, trac);
+ num = 0; get = 0; head = 0; post = 0; trac = 0;
+ secs = $1 ? $1 : 1;
+ lines++;
+ counts--;
+}
+
+/*
+ * End
+ */
+profile:::tick-1sec
+/counts == 0/
+{
+ exit(0);
+}
diff --git a/Apps/nfswizard.d b/Apps/nfswizard.d
new file mode 100755
index 000000000000..c63bc33dfa4e
--- /dev/null
+++ b/Apps/nfswizard.d
@@ -0,0 +1,102 @@
+#!/usr/sbin/dtrace -s
+/*
+ * nfswizard.d - nfs client activity wizard.
+ * Written using DTrace (Solaris 10 3/05).
+ *
+ * This examines activity caused by NFS client processes on the same server
+ * that you are running this script on. A detailed report is generated
+ * to explain various details of NFS client activity, including response
+ * times and file access.
+ *
+ * $Id: nfswizard.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: nfswizard.d # hit Ctrl-C to end sample
+ *
+ * COPYRIGHT: Copyright (c) 2005, 2006 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 02-Dec-2005 Brendan Gregg Created this.
+ * 20-Apr-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+dtrace:::BEGIN
+{
+ printf("Tracing... Hit Ctrl-C to end.\n");
+ scriptstart = walltimestamp;
+ timestart = timestamp;
+}
+
+io:nfs::start
+{
+ /* tally file sizes */
+ @file[args[2]->fi_pathname] = sum(args[0]->b_bcount);
+
+ /* time response */
+ start[args[0]->b_addr] = timestamp;
+
+ /* overall stats */
+ @rbytes = sum(args[0]->b_flags & B_READ ? args[0]->b_bcount : 0);
+ @wbytes = sum(args[0]->b_flags & B_READ ? 0 : args[0]->b_bcount);
+ @events = count();
+}
+
+io:nfs::done
+/start[args[0]->b_addr]/
+{
+ /* calculate and save response time stats */
+ this->elapsed = timestamp - start[args[0]->b_addr];
+ @maxtime = max(this->elapsed);
+ @avgtime = avg(this->elapsed);
+ @qnztime = quantize(this->elapsed / 1000);
+}
+
+dtrace:::END
+{
+ /* print header */
+ printf("NFS Client Wizard. %Y -> %Y\n\n", scriptstart, walltimestamp);
+
+ /* print read/write stats */
+ printa("Read: %@d bytes ", @rbytes);
+ normalize(@rbytes, 1000000);
+ printa("(%@d Mb)\n", @rbytes);
+ printa("Write: %@d bytes ", @wbytes);
+ normalize(@wbytes, 1000000);
+ printa("(%@d Mb)\n\n", @wbytes);
+
+ /* print throughput stats */
+ denormalize(@rbytes);
+ normalize(@rbytes, (timestamp - timestart) / 1000000);
+ printa("Read: %@d Kb/sec\n", @rbytes);
+ denormalize(@wbytes);
+ normalize(@wbytes, (timestamp - timestart) / 1000000);
+ printa("Write: %@d Kb/sec\n\n", @wbytes);
+
+ /* print time stats */
+ printa("NFS I/O events: %@d\n", @events);
+ normalize(@avgtime, 1000000);
+ printa("Avg response time: %@d ms\n", @avgtime);
+ normalize(@maxtime, 1000000);
+ printa("Max response time: %@d ms\n\n", @maxtime);
+ printa("Response times (us):%@d\n", @qnztime);
+
+ /* print file stats */
+ printf("Top 25 files accessed (bytes):\n");
+ printf(" %-64s %s\n", "PATHNAME", "BYTES");
+ trunc(@file, 25);
+ printa(" %-64s %@d\n", @file);
+}
diff --git a/Apps/shellsnoop b/Apps/shellsnoop
new file mode 100755
index 000000000000..95f42c046529
--- /dev/null
+++ b/Apps/shellsnoop
@@ -0,0 +1,268 @@
+#!/usr/bin/sh
+#
+# shellsnoop - A program to print read/write details from shells,
+# such as keystrokes and command outputs.
+# Written using DTrace (Solaris 10 3/05).
+#
+# This program sounds somewhat dangerous (snooping keystrokes), but is
+# no more so than /usr/bin/truss, and both need root or dtrace privileges to
+# run. In fact, less dangerous, as we only print visible text (not password
+# text, for example). Having said that, it goes without saying that this
+# program shouldn't be used for breeching privacy of other users.
+#
+# This was written as a tool to demonstrate the capabilities of DTrace.
+#
+# $Id: shellsnoop 19 2007-09-12 07:47:59Z brendan $
+#
+# USAGE: shellsnoop [-hqsv] [-p PID] [-u UID]
+#
+# -q # quiet, only print data
+# -s # include start time, us
+# -v # include start time, string
+# -p PID # process ID to snoop
+# -u UID # user ID to snoop
+# eg,
+# shellsnoop # default output
+# shellsnoop -v # human readable timestamps
+# shellsnoop -p 1892 # snoop this PID only
+# shellsnoop -qp 1892 # watch this PID data only
+#
+# FIELDS:
+# UID User ID
+# PID process ID
+# PPID parent process ID
+# COMM command name
+# DIR direction (R read, W write)
+# TEXT text contained in the read/write
+# TIME timestamp for the command, us
+# STRTIME timestamp for the command, string
+#
+# SEE ALSO: ttywatcher
+#
+# COPYRIGHT: Copyright (c) 2005 Brendan Gregg.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at Docs/cddl1.txt
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# CDDL HEADER END
+#
+# Author: Brendan Gregg [Sydney, Australia]
+#
+# 28-Mar-2004 Brendan Gregg Created this.
+# 21-Jan-2005 " " Wrapped in sh to provide options.
+# 30-Nov-2005 " " Fixed trailing buffer text bug.
+# 30-Nov-2005 " " Fixed sh no keystroke text in quiet bug.
+# 30-Nov-2005 " " Last update.
+#
+
+
+##############################
+# --- Process Arguments ---
+#
+opt_pid=0; opt_uid=0; opt_time=0; opt_timestr=0; opt_quiet=0; opt_debug=0
+filter=0; pid=0; uid=0
+
+while getopts dhp:qsu:v name
+do
+ case $name in
+ d) opt_debug=1 ;;
+ p) opt_pid=1; pid=$OPTARG ;;
+ q) opt_quiet=1 ;;
+ s) opt_time=1 ;;
+ u) opt_uid=1; uid=$OPTARG ;;
+ v) opt_timestr=1 ;;
+ h|?) cat <<-END >&2
+ USAGE: shellsnoop [-hqsv] [-p PID] [-u UID]
+ shellsnoop # default output
+ -q # quiet, only print data
+ -s # include start time, us
+ -v # include start time, string
+ -p PID # process ID to snoop
+ -u UID # user ID to snoop
+ END
+ exit 1
+ esac
+done
+
+if [ $opt_quiet -eq 1 ]; then
+ opt_time=0; opt_timestr=0
+fi
+if [ $opt_pid -eq 1 -o $opt_uid -eq 1 ]; then
+ filter=1
+fi
+
+
+#################################
+# --- Main Program, DTrace ---
+#
+dtrace -n '
+ /*
+ * Command line arguments
+ */
+ inline int OPT_debug = '$opt_debug';
+ inline int OPT_quiet = '$opt_quiet';
+ inline int OPT_pid = '$opt_pid';
+ inline int OPT_uid = '$opt_uid';
+ inline int OPT_time = '$opt_time';
+ inline int OPT_timestr = '$opt_timestr';
+ inline int FILTER = '$filter';
+ inline int PID = '$pid';
+ inline int UID = '$uid';
+
+ #pragma D option quiet
+ #pragma D option switchrate=20hz
+
+ /*
+ * Print header
+ */
+ dtrace:::BEGIN /OPT_time == 1/
+ {
+ printf("%-14s ","TIME");
+ }
+ dtrace:::BEGIN /OPT_timestr == 1/
+ {
+ printf("%-20s ","STRTIME");
+ }
+ dtrace:::BEGIN /OPT_quiet == 0/
+ {
+ printf("%5s %5s %8s %3s %s\n", "PID", "PPID", "CMD", "DIR", "TEXT");
+ }
+
+ /*
+ * Remember this PID is a shell child
+ */
+ syscall::exec:entry, syscall::exece:entry
+ /execname == "sh" || execname == "ksh" || execname == "csh" ||
+ execname == "tcsh" || execname == "zsh" || execname == "bash"/
+ {
+ child[pid] = 1;
+
+ /* debug */
+ this->parent = (char *)curthread->t_procp->p_parent->p_user.u_comm;
+ OPT_debug == 1 ? printf("PID %d CMD %s started. (%s)\n",
+ pid, execname, stringof(this->parent)) : 1;
+ }
+ syscall::exec:entry, syscall::exece:entry
+ /(OPT_pid == 1 && PID != ppid) || (OPT_uid == 1 && UID != uid)/
+ {
+ /* forget if filtered */
+ child[pid] = 0;
+ }
+
+ /*
+ * Print shell keystrokes
+ */
+ syscall::write:entry, syscall::read:entry
+ /(execname == "sh" || execname == "ksh" || execname == "csh" ||
+ execname == "tcsh" || execname == "zsh" || execname == "bash")
+ && (arg0 >= 0 && arg0 <= 2)/
+ {
+ self->buf = arg1;
+ }
+ syscall::write:entry, syscall::read:entry
+ /(OPT_pid == 1 && PID != pid) || (OPT_uid == 1 && UID != uid)/
+ {
+ self->buf = 0;
+ }
+ syscall::write:return, syscall::read:return
+ /self->buf && child[pid] == 0 && OPT_time == 1/
+ {
+ printf("%-14d ", timestamp/1000);
+ }
+ syscall::write:return, syscall::read:return
+ /self->buf && child[pid] == 0 && OPT_timestr == 1/
+ {
+ printf("%-20Y ", walltimestamp);
+ }
+ syscall::write:return, syscall::read:return
+ /self->buf && child[pid] == 0 && OPT_quiet == 0/
+ {
+ this->text = (char *)copyin(self->buf, arg0);
+ this->text[arg0] = '\'\\0\'';
+
+ printf("%5d %5d %8s %3s %s\n", pid, curpsinfo->pr_ppid, execname,
+ probefunc == "read" ? "R" : "W", stringof(this->text));
+ }
+ syscall::write:return
+ /self->buf && child[pid] == 0 && OPT_quiet == 1/
+ {
+ this->text = (char *)copyin(self->buf, arg0);
+ this->text[arg0] = '\'\\0\'';
+ printf("%s", stringof(this->text));
+ }
+ syscall::read:return
+ /self->buf && execname == "sh" && child[pid] == 0 && OPT_quiet == 1/
+ {
+ this->text = (char *)copyin(self->buf, arg0);
+ this->text[arg0] = '\'\\0\'';
+ printf("%s", stringof(this->text));
+ }
+ syscall::write:return, syscall::read:return
+ /self->buf && child[pid] == 0/
+ {
+ self->buf = 0;
+ }
+
+ /*
+ * Print command output
+ */
+ syscall::write:entry, syscall::read:entry
+ /child[pid] == 1 && (arg0 == 1 || arg0 == 2)/
+ {
+ self->buf = arg1;
+ }
+ syscall::write:return, syscall::read:return
+ /self->buf && OPT_time == 1/
+ {
+ printf("%-14d ", timestamp/1000);
+ }
+ syscall::write:return, syscall::read:return
+ /self->buf && OPT_timestr == 1/
+ {
+ printf("%-20Y ", walltimestamp);
+ }
+ syscall::write:return, syscall::read:return
+ /self->buf && OPT_quiet == 0/
+ {
+ this->text = (char *)copyin(self->buf, arg0);
+ this->text[arg0] = '\'\\0\'';
+
+ printf("%5d %5d %8s %3s %s", pid, curpsinfo->pr_ppid, execname,
+ probefunc == "read" ? "R" : "W", stringof(this->text));
+
+ /* here we check if a newline is needed */
+ this->length = strlen(this->text);
+ printf("%s", this->text[this->length - 1] == '\'\\n\'' ? "" : "\n");
+ self->buf = 0;
+ }
+ syscall::write:return, syscall::read:return
+ /self->buf && OPT_quiet == 1/
+ {
+ this->text = (char *)copyin(self->buf, arg0);
+ this->text[arg0] = '\'\\0\'';
+ printf("%s", stringof(this->text));
+ self->buf = 0;
+ }
+
+ /*
+ * Cleanup
+ */
+ syscall::rexit:entry
+ {
+ child[pid] = 0;
+
+ /* debug */
+ this->parent = (char *)curthread->t_procp->p_parent->p_user.u_comm;
+ OPT_debug == 1 ? printf("PID %d CMD %s exited. (%s)\n",
+ pid, execname, stringof(this->parent)) : 1;
+ }
+'
diff --git a/Apps/weblatency.d b/Apps/weblatency.d
new file mode 100755
index 000000000000..8d96d5cdd88b
--- /dev/null
+++ b/Apps/weblatency.d
@@ -0,0 +1,186 @@
+#!/usr/sbin/dtrace -s
+/*
+ * weblatency.d - website latency statistics.
+ * Written using DTrace (Solaris 10 3/05).
+ *
+ * $Id: weblatency.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: weblatency.d # hit Ctrl-C to end sample
+ *
+ * See the code below for the "BROWSER" variable, which sets the browser
+ * to trace (currently set to "mozilla-bin").
+ *
+ * This is written as an experimental tool, and may not work at all with
+ * your browser.
+ *
+ * FIELDS:
+ * HOST Hostname from URL
+ * NUM Number of GETs
+ * AVGTIME(ms) Average time for response, ms
+ * MAXTIME(ms) Maximum time for response, ms
+ *
+ * NOTE:
+ *
+ * The latency measured here is from the browser sending the GET
+ * request to when the browser begins to recieve the response. It
+ * is an overall response time for the client, and encompasses
+ * connection speed delays, DNS lookups, proxy delays, and web server
+ * response time.
+ *
+ * IDEA: Bryan Cantrill (who wrote an elegant version for Sol 10 update 1)
+ *
+ * COPYRIGHT: Copyright (c) 2005, 2006 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * ToDo:
+ * Check write fd for socket, not file.
+ *
+ * 30-Nov-2005 Brendan Gregg Created this.
+ * 20-Apr-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+/* browser's execname */
+inline string BROWSER = "mozilla-bin";
+
+/* maximum expected hostname length + "GET http://" */
+inline int MAX_REQ = 64;
+
+dtrace:::BEGIN
+{
+ printf("Tracing... Hit Ctrl-C to end.\n");
+}
+
+/*
+ * Trace brower request
+ *
+ * This is achieved by matching writes for the browser's execname that
+ * start with "GET", and then timing from the return of the write to
+ * the return of the next read in the same thread. Various stateful flags
+ * are used: self->fd, self->read.
+ *
+ * For performance reasons, I'd like to only process writes that follow a
+ * connect(), however this approach fails to process keepalives.
+ */
+syscall::write:entry
+/execname == BROWSER/
+{
+ self->buf = arg1;
+ self->fd = arg0 + 1;
+ self->nam = "";
+}
+
+syscall::write:return
+/self->fd/
+{
+ this->str = (char *)copyin(self->buf, MAX_REQ);
+ this->str[4] = '\0';
+ self->fd = stringof(this->str) == "GET " ? self->fd : 0;
+}
+
+syscall::write:return
+/self->fd/
+{
+ /* fetch browser request */
+ this->str = (char *)copyin(self->buf, MAX_REQ);
+ this->str[MAX_REQ] = '\0';
+
+ /*
+ * This unrolled loop strips down a URL to it's hostname.
+ * We ought to use strtok(), but it's not available on Sol 10 3/05,
+ * so instead I used dirname(). It's not pretty - it's done so that
+ * this works on all Sol 10 versions.
+ */
+ self->req = stringof(this->str);
+ self->nam = strlen(self->req) > 15 ? self->req : self->nam;
+ self->req = dirname(self->req);
+ self->nam = strlen(self->req) > 15 ? self->req : self->nam;
+ self->req = dirname(self->req);
+ self->nam = strlen(self->req) > 15 ? self->req : self->nam;
+ self->req = dirname(self->req);
+ self->nam = strlen(self->req) > 15 ? self->req : self->nam;
+ self->req = dirname(self->req);
+ self->nam = strlen(self->req) > 15 ? self->req : self->nam;
+ self->req = dirname(self->req);
+ self->nam = strlen(self->req) > 15 ? self->req : self->nam;
+ self->req = dirname(self->req);
+ self->nam = strlen(self->req) > 15 ? self->req : self->nam;
+ self->req = dirname(self->req);
+ self->nam = strlen(self->req) > 15 ? self->req : self->nam;
+ self->req = dirname(self->req);
+ self->nam = strlen(self->req) > 15 ? self->req : self->nam;
+ self->nam = basename(self->nam);
+
+ /* start the timer */
+ start[pid, self->fd - 1] = timestamp;
+ host[pid, self->fd - 1] = self->nam;
+ self->buf = 0;
+ self->fd = 0;
+ self->req = 0;
+ self->nam = 0;
+}
+
+/* this one wasn't a GET */
+syscall::write:return
+/self->buf/
+{
+ self->buf = 0;
+ self->fd = 0;
+}
+
+syscall::read:entry
+/execname == BROWSER && start[pid, arg0]/
+{
+ self->fd = arg0 + 1;
+}
+
+/*
+ * Record host details
+ */
+syscall::read:return
+/self->fd/
+{
+ /* fetch details */
+ self->host = stringof(host[pid, self->fd - 1]);
+ this->start = start[pid, self->fd - 1];
+
+ /* save details */
+ @Avg[self->host] = avg((timestamp - this->start)/1000000);
+ @Max[self->host] = max((timestamp - this->start)/1000000);
+ @Num[self->host] = count();
+
+ /* clear vars */
+ start[pid, self->fd - 1] = 0;
+ host[pid, self->fd - 1] = 0;
+ self->host = 0;
+ self->fd = 0;
+}
+
+/*
+ * Output report
+ */
+dtrace:::END
+{
+ printf("%-32s %11s\n", "HOST", "NUM");
+ printa("%-32s %@11d\n", @Num);
+
+ printf("\n%-32s %11s\n", "HOST", "AVGTIME(ms)");
+ printa("%-32s %@11d\n", @Avg);
+
+ printf("\n%-32s %11s\n", "HOST", "MAXTIME(ms)");
+ printa("%-32s %@11d\n", @Max);
+}
diff --git a/Bin/anonpgpid.d b/Bin/anonpgpid.d
new file mode 120000
index 000000000000..f48a5104fc69
--- /dev/null
+++ b/Bin/anonpgpid.d
@@ -0,0 +1 @@
+../Mem/anonpgpid.d \ No newline at end of file
diff --git a/Bin/bitesize.d b/Bin/bitesize.d
new file mode 120000
index 000000000000..6f984e083f9e
--- /dev/null
+++ b/Bin/bitesize.d
@@ -0,0 +1 @@
+../Disk/bitesize.d \ No newline at end of file
diff --git a/Bin/connections b/Bin/connections
new file mode 120000
index 000000000000..1be9a640e58a
--- /dev/null
+++ b/Bin/connections
@@ -0,0 +1 @@
+../Net/connections \ No newline at end of file
diff --git a/Bin/cpudists b/Bin/cpudists
new file mode 120000
index 000000000000..91f0d8022968
--- /dev/null
+++ b/Bin/cpudists
@@ -0,0 +1 @@
+../Kernel/cpudists \ No newline at end of file
diff --git a/Bin/cputimes b/Bin/cputimes
new file mode 120000
index 000000000000..219dbbc6ca64
--- /dev/null
+++ b/Bin/cputimes
@@ -0,0 +1 @@
+../Kernel/cputimes \ No newline at end of file
diff --git a/Bin/cputypes.d b/Bin/cputypes.d
new file mode 120000
index 000000000000..da583feb485f
--- /dev/null
+++ b/Bin/cputypes.d
@@ -0,0 +1 @@
+../Cpu/cputypes.d \ No newline at end of file
diff --git a/Bin/cpuwalk.d b/Bin/cpuwalk.d
new file mode 120000
index 000000000000..5a1c26e74bfd
--- /dev/null
+++ b/Bin/cpuwalk.d
@@ -0,0 +1 @@
+../Cpu/cpuwalk.d \ No newline at end of file
diff --git a/Bin/crash.d b/Bin/crash.d
new file mode 120000
index 000000000000..d3a3cf8c78d1
--- /dev/null
+++ b/Bin/crash.d
@@ -0,0 +1 @@
+../Proc/crash.d \ No newline at end of file
diff --git a/Bin/creatbyproc.d b/Bin/creatbyproc.d
new file mode 120000
index 000000000000..fecd0f32021f
--- /dev/null
+++ b/Bin/creatbyproc.d
@@ -0,0 +1 @@
+../Proc/creatbyproc.d \ No newline at end of file
diff --git a/Bin/cswstat.d b/Bin/cswstat.d
new file mode 120000
index 000000000000..ea54280e10a0
--- /dev/null
+++ b/Bin/cswstat.d
@@ -0,0 +1 @@
+../Kernel/cswstat.d \ No newline at end of file
diff --git a/Bin/dappprof b/Bin/dappprof
new file mode 120000
index 000000000000..e4fc32ef5658
--- /dev/null
+++ b/Bin/dappprof
@@ -0,0 +1 @@
+../Proc/dappprof \ No newline at end of file
diff --git a/Bin/dapptrace b/Bin/dapptrace
new file mode 120000
index 000000000000..1d38cb5ee7c4
--- /dev/null
+++ b/Bin/dapptrace
@@ -0,0 +1 @@
+../Proc/dapptrace \ No newline at end of file
diff --git a/Bin/dexplorer b/Bin/dexplorer
new file mode 120000
index 000000000000..41c36e49bd9d
--- /dev/null
+++ b/Bin/dexplorer
@@ -0,0 +1 @@
+../dexplorer \ No newline at end of file
diff --git a/Bin/diskhits b/Bin/diskhits
new file mode 120000
index 000000000000..4a57310d9333
--- /dev/null
+++ b/Bin/diskhits
@@ -0,0 +1 @@
+../Disk/diskhits \ No newline at end of file
diff --git a/Bin/dispqlen.d b/Bin/dispqlen.d
new file mode 120000
index 000000000000..1073e0b863f1
--- /dev/null
+++ b/Bin/dispqlen.d
@@ -0,0 +1 @@
+../Cpu/dispqlen.d \ No newline at end of file
diff --git a/Bin/dnlcps.d b/Bin/dnlcps.d
new file mode 120000
index 000000000000..efca13ceaf41
--- /dev/null
+++ b/Bin/dnlcps.d
@@ -0,0 +1 @@
+../Kernel/dnlcps.d \ No newline at end of file
diff --git a/Bin/dnlcsnoop.d b/Bin/dnlcsnoop.d
new file mode 120000
index 000000000000..247868728e05
--- /dev/null
+++ b/Bin/dnlcsnoop.d
@@ -0,0 +1 @@
+../Kernel/dnlcsnoop.d \ No newline at end of file
diff --git a/Bin/dnlcstat b/Bin/dnlcstat
new file mode 120000
index 000000000000..baec18905456
--- /dev/null
+++ b/Bin/dnlcstat
@@ -0,0 +1 @@
+../Kernel/dnlcstat \ No newline at end of file
diff --git a/Bin/dtruss b/Bin/dtruss
new file mode 120000
index 000000000000..90c00c6fe124
--- /dev/null
+++ b/Bin/dtruss
@@ -0,0 +1 @@
+../dtruss \ No newline at end of file
diff --git a/Bin/dvmstat b/Bin/dvmstat
new file mode 120000
index 000000000000..1b92321f0d47
--- /dev/null
+++ b/Bin/dvmstat
@@ -0,0 +1 @@
+../dvmstat \ No newline at end of file
diff --git a/Bin/errinfo b/Bin/errinfo
new file mode 120000
index 000000000000..fbecf4da7e2a
--- /dev/null
+++ b/Bin/errinfo
@@ -0,0 +1 @@
+../errinfo \ No newline at end of file
diff --git a/Bin/execsnoop b/Bin/execsnoop
new file mode 120000
index 000000000000..3a0dde2b1d5c
--- /dev/null
+++ b/Bin/execsnoop
@@ -0,0 +1 @@
+../execsnoop \ No newline at end of file
diff --git a/Bin/fddist b/Bin/fddist
new file mode 120000
index 000000000000..11d6e20f3714
--- /dev/null
+++ b/Bin/fddist
@@ -0,0 +1 @@
+../Proc/fddist \ No newline at end of file
diff --git a/Bin/filebyproc.d b/Bin/filebyproc.d
new file mode 120000
index 000000000000..5c2b2c596a7c
--- /dev/null
+++ b/Bin/filebyproc.d
@@ -0,0 +1 @@
+../Proc/filebyproc.d \ No newline at end of file
diff --git a/Bin/fspaging.d b/Bin/fspaging.d
new file mode 120000
index 000000000000..54db157bb489
--- /dev/null
+++ b/Bin/fspaging.d
@@ -0,0 +1 @@
+../FS/fspaging.d \ No newline at end of file
diff --git a/Bin/fsrw.d b/Bin/fsrw.d
new file mode 120000
index 000000000000..829e583e25b0
--- /dev/null
+++ b/Bin/fsrw.d
@@ -0,0 +1 @@
+../FS/fsrw.d \ No newline at end of file
diff --git a/Bin/guess.d b/Bin/guess.d
new file mode 120000
index 000000000000..b5a41fdf9de6
--- /dev/null
+++ b/Bin/guess.d
@@ -0,0 +1 @@
+../Misc/guess.d \ No newline at end of file
diff --git a/Bin/hotkernel b/Bin/hotkernel
new file mode 120000
index 000000000000..0b872c32e98b
--- /dev/null
+++ b/Bin/hotkernel
@@ -0,0 +1 @@
+../hotkernel \ No newline at end of file
diff --git a/Bin/hotspot.d b/Bin/hotspot.d
new file mode 120000
index 000000000000..dad526acd3fd
--- /dev/null
+++ b/Bin/hotspot.d
@@ -0,0 +1 @@
+../Disk/hotspot.d \ No newline at end of file
diff --git a/Bin/hotuser b/Bin/hotuser
new file mode 120000
index 000000000000..4ff615e9c289
--- /dev/null
+++ b/Bin/hotuser
@@ -0,0 +1 @@
+../hotuser \ No newline at end of file
diff --git a/Bin/httpdstat.d b/Bin/httpdstat.d
new file mode 120000
index 000000000000..5d8900d5aa2e
--- /dev/null
+++ b/Bin/httpdstat.d
@@ -0,0 +1 @@
+../Apps/httpdstat.d \ No newline at end of file
diff --git a/Bin/icmpstat.d b/Bin/icmpstat.d
new file mode 120000
index 000000000000..1d63bb75875f
--- /dev/null
+++ b/Bin/icmpstat.d
@@ -0,0 +1 @@
+../Net/icmpstat.d \ No newline at end of file
diff --git a/Bin/intbycpu.d b/Bin/intbycpu.d
new file mode 120000
index 000000000000..4897057d6937
--- /dev/null
+++ b/Bin/intbycpu.d
@@ -0,0 +1 @@
+../Cpu/intbycpu.d \ No newline at end of file
diff --git a/Bin/intoncpu.d b/Bin/intoncpu.d
new file mode 120000
index 000000000000..814c7be06dab
--- /dev/null
+++ b/Bin/intoncpu.d
@@ -0,0 +1 @@
+../Cpu/intoncpu.d \ No newline at end of file
diff --git a/Bin/inttimes.d b/Bin/inttimes.d
new file mode 120000
index 000000000000..5b179eecfe32
--- /dev/null
+++ b/Bin/inttimes.d
@@ -0,0 +1 @@
+../Cpu/inttimes.d \ No newline at end of file
diff --git a/Bin/iofile.d b/Bin/iofile.d
new file mode 120000
index 000000000000..8c63c1626464
--- /dev/null
+++ b/Bin/iofile.d
@@ -0,0 +1 @@
+../Disk/iofile.d \ No newline at end of file
diff --git a/Bin/iofileb.d b/Bin/iofileb.d
new file mode 120000
index 000000000000..7d6d404ad0c3
--- /dev/null
+++ b/Bin/iofileb.d
@@ -0,0 +1 @@
+../Disk/iofileb.d \ No newline at end of file
diff --git a/Bin/iopattern b/Bin/iopattern
new file mode 120000
index 000000000000..0257e0f83f0d
--- /dev/null
+++ b/Bin/iopattern
@@ -0,0 +1 @@
+../iopattern \ No newline at end of file
diff --git a/Bin/iopending b/Bin/iopending
new file mode 120000
index 000000000000..6ba932823527
--- /dev/null
+++ b/Bin/iopending
@@ -0,0 +1 @@
+../Disk/iopending \ No newline at end of file
diff --git a/Bin/iosnoop b/Bin/iosnoop
new file mode 120000
index 000000000000..2b86bcb70f63
--- /dev/null
+++ b/Bin/iosnoop
@@ -0,0 +1 @@
+../iosnoop \ No newline at end of file
diff --git a/Bin/iotop b/Bin/iotop
new file mode 120000
index 000000000000..14c124b300c1
--- /dev/null
+++ b/Bin/iotop
@@ -0,0 +1 @@
+../iotop \ No newline at end of file
diff --git a/Bin/j_calldist.d b/Bin/j_calldist.d
new file mode 120000
index 000000000000..3d40bca13089
--- /dev/null
+++ b/Bin/j_calldist.d
@@ -0,0 +1 @@
+../Java/j_calldist.d \ No newline at end of file
diff --git a/Bin/j_calls.d b/Bin/j_calls.d
new file mode 120000
index 000000000000..81ddfc590d22
--- /dev/null
+++ b/Bin/j_calls.d
@@ -0,0 +1 @@
+../Java/j_calls.d \ No newline at end of file
diff --git a/Bin/j_calltime.d b/Bin/j_calltime.d
new file mode 120000
index 000000000000..5261cabcb917
--- /dev/null
+++ b/Bin/j_calltime.d
@@ -0,0 +1 @@
+../Java/j_calltime.d \ No newline at end of file
diff --git a/Bin/j_classflow.d b/Bin/j_classflow.d
new file mode 120000
index 000000000000..e6fb86ad0140
--- /dev/null
+++ b/Bin/j_classflow.d
@@ -0,0 +1 @@
+../Java/j_classflow.d \ No newline at end of file
diff --git a/Bin/j_cpudist.d b/Bin/j_cpudist.d
new file mode 120000
index 000000000000..22f9adf86a0c
--- /dev/null
+++ b/Bin/j_cpudist.d
@@ -0,0 +1 @@
+../Java/j_cpudist.d \ No newline at end of file
diff --git a/Bin/j_cputime.d b/Bin/j_cputime.d
new file mode 120000
index 000000000000..bfb684366074
--- /dev/null
+++ b/Bin/j_cputime.d
@@ -0,0 +1 @@
+../Java/j_cputime.d \ No newline at end of file
diff --git a/Bin/j_events.d b/Bin/j_events.d
new file mode 120000
index 000000000000..385456118aae
--- /dev/null
+++ b/Bin/j_events.d
@@ -0,0 +1 @@
+../Java/j_events.d \ No newline at end of file
diff --git a/Bin/j_flow.d b/Bin/j_flow.d
new file mode 120000
index 000000000000..852a740c83bd
--- /dev/null
+++ b/Bin/j_flow.d
@@ -0,0 +1 @@
+../Java/j_flow.d \ No newline at end of file
diff --git a/Bin/j_flowtime.d b/Bin/j_flowtime.d
new file mode 120000
index 000000000000..c0f9faeed015
--- /dev/null
+++ b/Bin/j_flowtime.d
@@ -0,0 +1 @@
+../Java/j_flowtime.d \ No newline at end of file
diff --git a/Bin/j_methodcalls.d b/Bin/j_methodcalls.d
new file mode 120000
index 000000000000..9e5e17f43288
--- /dev/null
+++ b/Bin/j_methodcalls.d
@@ -0,0 +1 @@
+../Java/j_methodcalls.d \ No newline at end of file
diff --git a/Bin/j_objnew.d b/Bin/j_objnew.d
new file mode 120000
index 000000000000..b91ddafd2cb9
--- /dev/null
+++ b/Bin/j_objnew.d
@@ -0,0 +1 @@
+../Java/j_objnew.d \ No newline at end of file
diff --git a/Bin/j_package.d b/Bin/j_package.d
new file mode 120000
index 000000000000..7627671107c8
--- /dev/null
+++ b/Bin/j_package.d
@@ -0,0 +1 @@
+../Java/j_package.d \ No newline at end of file
diff --git a/Bin/j_profile.d b/Bin/j_profile.d
new file mode 120000
index 000000000000..270532ca7971
--- /dev/null
+++ b/Bin/j_profile.d
@@ -0,0 +1 @@
+../Java/j_profile.d \ No newline at end of file
diff --git a/Bin/j_stat.d b/Bin/j_stat.d
new file mode 120000
index 000000000000..128f913603f2
--- /dev/null
+++ b/Bin/j_stat.d
@@ -0,0 +1 @@
+../Java/j_stat.d \ No newline at end of file
diff --git a/Bin/j_syscalls.d b/Bin/j_syscalls.d
new file mode 120000
index 000000000000..fae39687ab58
--- /dev/null
+++ b/Bin/j_syscalls.d
@@ -0,0 +1 @@
+../Java/j_syscalls.d \ No newline at end of file
diff --git a/Bin/j_syscolors.d b/Bin/j_syscolors.d
new file mode 120000
index 000000000000..4acffad372b7
--- /dev/null
+++ b/Bin/j_syscolors.d
@@ -0,0 +1 @@
+../Java/j_syscolors.d \ No newline at end of file
diff --git a/Bin/j_thread.d b/Bin/j_thread.d
new file mode 120000
index 000000000000..f88296ce202f
--- /dev/null
+++ b/Bin/j_thread.d
@@ -0,0 +1 @@
+../Java/j_thread.d \ No newline at end of file
diff --git a/Bin/j_who.d b/Bin/j_who.d
new file mode 120000
index 000000000000..f2aba284055c
--- /dev/null
+++ b/Bin/j_who.d
@@ -0,0 +1 @@
+../Java/j_who.d \ No newline at end of file
diff --git a/Bin/js_calldist.d b/Bin/js_calldist.d
new file mode 120000
index 000000000000..93277b09ba67
--- /dev/null
+++ b/Bin/js_calldist.d
@@ -0,0 +1 @@
+../JavaScript/js_calldist.d \ No newline at end of file
diff --git a/Bin/js_calls.d b/Bin/js_calls.d
new file mode 120000
index 000000000000..9c27755e5f7b
--- /dev/null
+++ b/Bin/js_calls.d
@@ -0,0 +1 @@
+../JavaScript/js_calls.d \ No newline at end of file
diff --git a/Bin/js_calltime.d b/Bin/js_calltime.d
new file mode 120000
index 000000000000..6ec2eedd737d
--- /dev/null
+++ b/Bin/js_calltime.d
@@ -0,0 +1 @@
+../JavaScript/js_calltime.d \ No newline at end of file
diff --git a/Bin/js_cpudist.d b/Bin/js_cpudist.d
new file mode 120000
index 000000000000..2d0c07ab5370
--- /dev/null
+++ b/Bin/js_cpudist.d
@@ -0,0 +1 @@
+../JavaScript/js_cpudist.d \ No newline at end of file
diff --git a/Bin/js_cputime.d b/Bin/js_cputime.d
new file mode 120000
index 000000000000..1c5c716a3b16
--- /dev/null
+++ b/Bin/js_cputime.d
@@ -0,0 +1 @@
+../JavaScript/js_cputime.d \ No newline at end of file
diff --git a/Bin/js_execs.d b/Bin/js_execs.d
new file mode 120000
index 000000000000..2f5c4a6861fd
--- /dev/null
+++ b/Bin/js_execs.d
@@ -0,0 +1 @@
+../JavaScript/js_execs.d \ No newline at end of file
diff --git a/Bin/js_flow.d b/Bin/js_flow.d
new file mode 120000
index 000000000000..ea2f3e78fab5
--- /dev/null
+++ b/Bin/js_flow.d
@@ -0,0 +1 @@
+../JavaScript/js_flow.d \ No newline at end of file
diff --git a/Bin/js_flowinfo.d b/Bin/js_flowinfo.d
new file mode 120000
index 000000000000..0edb8bd84ac8
--- /dev/null
+++ b/Bin/js_flowinfo.d
@@ -0,0 +1 @@
+../JavaScript/js_flowinfo.d \ No newline at end of file
diff --git a/Bin/js_flowtime.d b/Bin/js_flowtime.d
new file mode 120000
index 000000000000..cec488cbfe96
--- /dev/null
+++ b/Bin/js_flowtime.d
@@ -0,0 +1 @@
+../JavaScript/js_flowtime.d \ No newline at end of file
diff --git a/Bin/js_objcpu.d b/Bin/js_objcpu.d
new file mode 120000
index 000000000000..51aacf53ef04
--- /dev/null
+++ b/Bin/js_objcpu.d
@@ -0,0 +1 @@
+../JavaScript/js_objcpu.d \ No newline at end of file
diff --git a/Bin/js_objgc.d b/Bin/js_objgc.d
new file mode 120000
index 000000000000..06f84602208c
--- /dev/null
+++ b/Bin/js_objgc.d
@@ -0,0 +1 @@
+../JavaScript/js_objgc.d \ No newline at end of file
diff --git a/Bin/js_objnew.d b/Bin/js_objnew.d
new file mode 120000
index 000000000000..1a7fc16abac7
--- /dev/null
+++ b/Bin/js_objnew.d
@@ -0,0 +1 @@
+../JavaScript/js_objnew.d \ No newline at end of file
diff --git a/Bin/js_stat.d b/Bin/js_stat.d
new file mode 120000
index 000000000000..b2bc6da5871f
--- /dev/null
+++ b/Bin/js_stat.d
@@ -0,0 +1 @@
+../JavaScript/js_stat.d \ No newline at end of file
diff --git a/Bin/js_who.d b/Bin/js_who.d
new file mode 120000
index 000000000000..40bea74dbd19
--- /dev/null
+++ b/Bin/js_who.d
@@ -0,0 +1 @@
+../JavaScript/js_who.d \ No newline at end of file
diff --git a/Bin/kill.d b/Bin/kill.d
new file mode 120000
index 000000000000..d8c4a73c0d55
--- /dev/null
+++ b/Bin/kill.d
@@ -0,0 +1 @@
+../Proc/kill.d \ No newline at end of file
diff --git a/Bin/kstat_types.d b/Bin/kstat_types.d
new file mode 120000
index 000000000000..156079c0e12c
--- /dev/null
+++ b/Bin/kstat_types.d
@@ -0,0 +1 @@
+../Kernel/kstat_types.d \ No newline at end of file
diff --git a/Bin/lastwords b/Bin/lastwords
new file mode 120000
index 000000000000..54fc3ae2cb8c
--- /dev/null
+++ b/Bin/lastwords
@@ -0,0 +1 @@
+../Proc/lastwords \ No newline at end of file
diff --git a/Bin/loads.d b/Bin/loads.d
new file mode 120000
index 000000000000..842dd94cce0b
--- /dev/null
+++ b/Bin/loads.d
@@ -0,0 +1 @@
+../Cpu/loads.d \ No newline at end of file
diff --git a/Bin/lockbydist.d b/Bin/lockbydist.d
new file mode 120000
index 000000000000..5e9b4a51ea77
--- /dev/null
+++ b/Bin/lockbydist.d
@@ -0,0 +1 @@
+../Locks/lockbydist.d \ No newline at end of file
diff --git a/Bin/lockbyproc.d b/Bin/lockbyproc.d
new file mode 120000
index 000000000000..d16d9412107e
--- /dev/null
+++ b/Bin/lockbyproc.d
@@ -0,0 +1 @@
+../Locks/lockbyproc.d \ No newline at end of file
diff --git a/Bin/minfbypid.d b/Bin/minfbypid.d
new file mode 120000
index 000000000000..b8ccf800e540
--- /dev/null
+++ b/Bin/minfbypid.d
@@ -0,0 +1 @@
+../Mem/minfbypid.d \ No newline at end of file
diff --git a/Bin/minfbyproc.d b/Bin/minfbyproc.d
new file mode 120000
index 000000000000..955320335515
--- /dev/null
+++ b/Bin/minfbyproc.d
@@ -0,0 +1 @@
+../Mem/minfbyproc.d \ No newline at end of file
diff --git a/Bin/mmapfiles.d b/Bin/mmapfiles.d
new file mode 120000
index 000000000000..728fd7551873
--- /dev/null
+++ b/Bin/mmapfiles.d
@@ -0,0 +1 @@
+../Proc/mmapfiles.d \ No newline at end of file
diff --git a/Bin/modcalls.d b/Bin/modcalls.d
new file mode 120000
index 000000000000..fe49549de232
--- /dev/null
+++ b/Bin/modcalls.d
@@ -0,0 +1 @@
+../Kernel/modcalls.d \ No newline at end of file
diff --git a/Bin/newproc.d b/Bin/newproc.d
new file mode 120000
index 000000000000..9387784fc719
--- /dev/null
+++ b/Bin/newproc.d
@@ -0,0 +1 @@
+../Proc/newproc.d \ No newline at end of file
diff --git a/Bin/nfswizard.d b/Bin/nfswizard.d
new file mode 120000
index 000000000000..ddc19d2f8042
--- /dev/null
+++ b/Bin/nfswizard.d
@@ -0,0 +1 @@
+../Apps/nfswizard.d \ No newline at end of file
diff --git a/Bin/opensnoop b/Bin/opensnoop
new file mode 120000
index 000000000000..3fcae8514482
--- /dev/null
+++ b/Bin/opensnoop
@@ -0,0 +1 @@
+../opensnoop \ No newline at end of file
diff --git a/Bin/pathopens.d b/Bin/pathopens.d
new file mode 120000
index 000000000000..21c28a5017ba
--- /dev/null
+++ b/Bin/pathopens.d
@@ -0,0 +1 @@
+../Proc/pathopens.d \ No newline at end of file
diff --git a/Bin/pfilestat b/Bin/pfilestat
new file mode 120000
index 000000000000..333765ff98db
--- /dev/null
+++ b/Bin/pfilestat
@@ -0,0 +1 @@
+../Proc/pfilestat \ No newline at end of file
diff --git a/Bin/pgpginbypid.d b/Bin/pgpginbypid.d
new file mode 120000
index 000000000000..cfa2d799f0bc
--- /dev/null
+++ b/Bin/pgpginbypid.d
@@ -0,0 +1 @@
+../Mem/pgpginbypid.d \ No newline at end of file
diff --git a/Bin/pgpginbyproc.d b/Bin/pgpginbyproc.d
new file mode 120000
index 000000000000..4e9a8b754f58
--- /dev/null
+++ b/Bin/pgpginbyproc.d
@@ -0,0 +1 @@
+../Mem/pgpginbyproc.d \ No newline at end of file
diff --git a/Bin/php_calldist.d b/Bin/php_calldist.d
new file mode 120000
index 000000000000..5ac4b43e2f7f
--- /dev/null
+++ b/Bin/php_calldist.d
@@ -0,0 +1 @@
+../Php/php_calldist.d \ No newline at end of file
diff --git a/Bin/php_calltime.d b/Bin/php_calltime.d
new file mode 120000
index 000000000000..49fb14b78cd9
--- /dev/null
+++ b/Bin/php_calltime.d
@@ -0,0 +1 @@
+../Php/php_calltime.d \ No newline at end of file
diff --git a/Bin/php_cpudist.d b/Bin/php_cpudist.d
new file mode 120000
index 000000000000..6e6595e00e1b
--- /dev/null
+++ b/Bin/php_cpudist.d
@@ -0,0 +1 @@
+../Php/php_cpudist.d \ No newline at end of file
diff --git a/Bin/php_cputime.d b/Bin/php_cputime.d
new file mode 120000
index 000000000000..3e8ccb942b01
--- /dev/null
+++ b/Bin/php_cputime.d
@@ -0,0 +1 @@
+../Php/php_cputime.d \ No newline at end of file
diff --git a/Bin/php_flow.d b/Bin/php_flow.d
new file mode 120000
index 000000000000..fa86f75a0bb4
--- /dev/null
+++ b/Bin/php_flow.d
@@ -0,0 +1 @@
+../Php/php_flow.d \ No newline at end of file
diff --git a/Bin/php_flowinfo.d b/Bin/php_flowinfo.d
new file mode 120000
index 000000000000..52ef64b7f459
--- /dev/null
+++ b/Bin/php_flowinfo.d
@@ -0,0 +1 @@
+../Php/php_flowinfo.d \ No newline at end of file
diff --git a/Bin/php_flowtime.d b/Bin/php_flowtime.d
new file mode 120000
index 000000000000..67dbe844b304
--- /dev/null
+++ b/Bin/php_flowtime.d
@@ -0,0 +1 @@
+../Php/php_flowtime.d \ No newline at end of file
diff --git a/Bin/php_funccalls.d b/Bin/php_funccalls.d
new file mode 120000
index 000000000000..2ba056bfe5e7
--- /dev/null
+++ b/Bin/php_funccalls.d
@@ -0,0 +1 @@
+../Php/php_funccalls.d \ No newline at end of file
diff --git a/Bin/php_malloc.d b/Bin/php_malloc.d
new file mode 120000
index 000000000000..9c51d8344eb2
--- /dev/null
+++ b/Bin/php_malloc.d
@@ -0,0 +1 @@
+../Php/php_malloc.d \ No newline at end of file
diff --git a/Bin/php_syscalls.d b/Bin/php_syscalls.d
new file mode 120000
index 000000000000..6587c4e1c387
--- /dev/null
+++ b/Bin/php_syscalls.d
@@ -0,0 +1 @@
+../Php/php_syscalls.d \ No newline at end of file
diff --git a/Bin/php_syscolors.d b/Bin/php_syscolors.d
new file mode 120000
index 000000000000..463f287a412d
--- /dev/null
+++ b/Bin/php_syscolors.d
@@ -0,0 +1 @@
+../Php/php_syscolors.d \ No newline at end of file
diff --git a/Bin/php_who.d b/Bin/php_who.d
new file mode 120000
index 000000000000..31d6acfd5773
--- /dev/null
+++ b/Bin/php_who.d
@@ -0,0 +1 @@
+../Php/php_who.d \ No newline at end of file
diff --git a/Bin/pidpersec.d b/Bin/pidpersec.d
new file mode 120000
index 000000000000..2ec6eb14514c
--- /dev/null
+++ b/Bin/pidpersec.d
@@ -0,0 +1 @@
+../Proc/pidpersec.d \ No newline at end of file
diff --git a/Bin/pl_calldist.d b/Bin/pl_calldist.d
new file mode 120000
index 000000000000..d5ef923a2672
--- /dev/null
+++ b/Bin/pl_calldist.d
@@ -0,0 +1 @@
+../Perl/pl_calldist.d \ No newline at end of file
diff --git a/Bin/pl_calltime.d b/Bin/pl_calltime.d
new file mode 120000
index 000000000000..38986ec85b66
--- /dev/null
+++ b/Bin/pl_calltime.d
@@ -0,0 +1 @@
+../Perl/pl_calltime.d \ No newline at end of file
diff --git a/Bin/pl_cpudist.d b/Bin/pl_cpudist.d
new file mode 120000
index 000000000000..ce4703602d09
--- /dev/null
+++ b/Bin/pl_cpudist.d
@@ -0,0 +1 @@
+../Perl/pl_cpudist.d \ No newline at end of file
diff --git a/Bin/pl_cputime.d b/Bin/pl_cputime.d
new file mode 120000
index 000000000000..66ea2f7867fe
--- /dev/null
+++ b/Bin/pl_cputime.d
@@ -0,0 +1 @@
+../Perl/pl_cputime.d \ No newline at end of file
diff --git a/Bin/pl_flow.d b/Bin/pl_flow.d
new file mode 120000
index 000000000000..b5d566e1e13a
--- /dev/null
+++ b/Bin/pl_flow.d
@@ -0,0 +1 @@
+../Perl/pl_flow.d \ No newline at end of file
diff --git a/Bin/pl_flowinfo.d b/Bin/pl_flowinfo.d
new file mode 120000
index 000000000000..ad53e51a6c75
--- /dev/null
+++ b/Bin/pl_flowinfo.d
@@ -0,0 +1 @@
+../Perl/pl_flowinfo.d \ No newline at end of file
diff --git a/Bin/pl_flowtime.d b/Bin/pl_flowtime.d
new file mode 120000
index 000000000000..89bee37932e2
--- /dev/null
+++ b/Bin/pl_flowtime.d
@@ -0,0 +1 @@
+../Perl/pl_flowtime.d \ No newline at end of file
diff --git a/Bin/pl_malloc.d b/Bin/pl_malloc.d
new file mode 120000
index 000000000000..025e4ef92f42
--- /dev/null
+++ b/Bin/pl_malloc.d
@@ -0,0 +1 @@
+../Perl/pl_malloc.d \ No newline at end of file
diff --git a/Bin/pl_subcalls.d b/Bin/pl_subcalls.d
new file mode 120000
index 000000000000..350f8c120550
--- /dev/null
+++ b/Bin/pl_subcalls.d
@@ -0,0 +1 @@
+../Perl/pl_subcalls.d \ No newline at end of file
diff --git a/Bin/pl_syscalls.d b/Bin/pl_syscalls.d
new file mode 120000
index 000000000000..a1ab6e5e939d
--- /dev/null
+++ b/Bin/pl_syscalls.d
@@ -0,0 +1 @@
+../Perl/pl_syscalls.d \ No newline at end of file
diff --git a/Bin/pl_syscolors.d b/Bin/pl_syscolors.d
new file mode 120000
index 000000000000..ebc087f4e4a0
--- /dev/null
+++ b/Bin/pl_syscolors.d
@@ -0,0 +1 @@
+../Perl/pl_syscolors.d \ No newline at end of file
diff --git a/Bin/pl_who.d b/Bin/pl_who.d
new file mode 120000
index 000000000000..398de670a223
--- /dev/null
+++ b/Bin/pl_who.d
@@ -0,0 +1 @@
+../Perl/pl_who.d \ No newline at end of file
diff --git a/Bin/priclass.d b/Bin/priclass.d
new file mode 120000
index 000000000000..09cd160a7375
--- /dev/null
+++ b/Bin/priclass.d
@@ -0,0 +1 @@
+../Kernel/priclass.d \ No newline at end of file
diff --git a/Bin/pridist.d b/Bin/pridist.d
new file mode 120000
index 000000000000..3c25cbdd35d9
--- /dev/null
+++ b/Bin/pridist.d
@@ -0,0 +1 @@
+../Kernel/pridist.d \ No newline at end of file
diff --git a/Bin/procsystime b/Bin/procsystime
new file mode 120000
index 000000000000..891c2a1d2f08
--- /dev/null
+++ b/Bin/procsystime
@@ -0,0 +1 @@
+../procsystime \ No newline at end of file
diff --git a/Bin/putnexts.d b/Bin/putnexts.d
new file mode 120000
index 000000000000..23cba6e46535
--- /dev/null
+++ b/Bin/putnexts.d
@@ -0,0 +1 @@
+../Kernel/putnexts.d \ No newline at end of file
diff --git a/Bin/py_calldist.d b/Bin/py_calldist.d
new file mode 120000
index 000000000000..4a007c54fff1
--- /dev/null
+++ b/Bin/py_calldist.d
@@ -0,0 +1 @@
+../Python/py_calldist.d \ No newline at end of file
diff --git a/Bin/py_calltime.d b/Bin/py_calltime.d
new file mode 120000
index 000000000000..6f1c400aba08
--- /dev/null
+++ b/Bin/py_calltime.d
@@ -0,0 +1 @@
+../Python/py_calltime.d \ No newline at end of file
diff --git a/Bin/py_cpudist.d b/Bin/py_cpudist.d
new file mode 120000
index 000000000000..76ce8db570a0
--- /dev/null
+++ b/Bin/py_cpudist.d
@@ -0,0 +1 @@
+../Python/py_cpudist.d \ No newline at end of file
diff --git a/Bin/py_cputime.d b/Bin/py_cputime.d
new file mode 120000
index 000000000000..d11dd87ac40d
--- /dev/null
+++ b/Bin/py_cputime.d
@@ -0,0 +1 @@
+../Python/py_cputime.d \ No newline at end of file
diff --git a/Bin/py_flow.d b/Bin/py_flow.d
new file mode 120000
index 000000000000..bf1485aff777
--- /dev/null
+++ b/Bin/py_flow.d
@@ -0,0 +1 @@
+../Python/py_flow.d \ No newline at end of file
diff --git a/Bin/py_flowinfo.d b/Bin/py_flowinfo.d
new file mode 120000
index 000000000000..adc611499207
--- /dev/null
+++ b/Bin/py_flowinfo.d
@@ -0,0 +1 @@
+../Python/py_flowinfo.d \ No newline at end of file
diff --git a/Bin/py_flowtime.d b/Bin/py_flowtime.d
new file mode 120000
index 000000000000..1ae51db26bf5
--- /dev/null
+++ b/Bin/py_flowtime.d
@@ -0,0 +1 @@
+../Python/py_flowtime.d \ No newline at end of file
diff --git a/Bin/py_funccalls.d b/Bin/py_funccalls.d
new file mode 120000
index 000000000000..81015120f6ab
--- /dev/null
+++ b/Bin/py_funccalls.d
@@ -0,0 +1 @@
+../Python/py_funccalls.d \ No newline at end of file
diff --git a/Bin/py_malloc.d b/Bin/py_malloc.d
new file mode 120000
index 000000000000..ed37a3b05678
--- /dev/null
+++ b/Bin/py_malloc.d
@@ -0,0 +1 @@
+../Python/py_malloc.d \ No newline at end of file
diff --git a/Bin/py_mallocstk.d b/Bin/py_mallocstk.d
new file mode 120000
index 000000000000..d2bb1bbfc71e
--- /dev/null
+++ b/Bin/py_mallocstk.d
@@ -0,0 +1 @@
+../Python/py_mallocstk.d \ No newline at end of file
diff --git a/Bin/py_profile.d b/Bin/py_profile.d
new file mode 120000
index 000000000000..3eb72196f3f0
--- /dev/null
+++ b/Bin/py_profile.d
@@ -0,0 +1 @@
+../Python/py_profile.d \ No newline at end of file
diff --git a/Bin/py_syscalls.d b/Bin/py_syscalls.d
new file mode 120000
index 000000000000..ecf137c31404
--- /dev/null
+++ b/Bin/py_syscalls.d
@@ -0,0 +1 @@
+../Python/py_syscalls.d \ No newline at end of file
diff --git a/Bin/py_syscolors.d b/Bin/py_syscolors.d
new file mode 120000
index 000000000000..6781115d28a3
--- /dev/null
+++ b/Bin/py_syscolors.d
@@ -0,0 +1 @@
+../Python/py_syscolors.d \ No newline at end of file
diff --git a/Bin/py_who.d b/Bin/py_who.d
new file mode 120000
index 000000000000..28db7e5f3e03
--- /dev/null
+++ b/Bin/py_who.d
@@ -0,0 +1 @@
+../Python/py_who.d \ No newline at end of file
diff --git a/Bin/rb_calldist.d b/Bin/rb_calldist.d
new file mode 120000
index 000000000000..8067860713ce
--- /dev/null
+++ b/Bin/rb_calldist.d
@@ -0,0 +1 @@
+../Ruby/rb_calldist.d \ No newline at end of file
diff --git a/Bin/rb_calls.d b/Bin/rb_calls.d
new file mode 120000
index 000000000000..266bacb2bf13
--- /dev/null
+++ b/Bin/rb_calls.d
@@ -0,0 +1 @@
+../Ruby/rb_calls.d \ No newline at end of file
diff --git a/Bin/rb_calltime.d b/Bin/rb_calltime.d
new file mode 120000
index 000000000000..f00df1a616bd
--- /dev/null
+++ b/Bin/rb_calltime.d
@@ -0,0 +1 @@
+../Ruby/rb_calltime.d \ No newline at end of file
diff --git a/Bin/rb_cpudist.d b/Bin/rb_cpudist.d
new file mode 120000
index 000000000000..6e77cc33b7f5
--- /dev/null
+++ b/Bin/rb_cpudist.d
@@ -0,0 +1 @@
+../Ruby/rb_cpudist.d \ No newline at end of file
diff --git a/Bin/rb_cputime.d b/Bin/rb_cputime.d
new file mode 120000
index 000000000000..88d9138ef8f6
--- /dev/null
+++ b/Bin/rb_cputime.d
@@ -0,0 +1 @@
+../Ruby/rb_cputime.d \ No newline at end of file
diff --git a/Bin/rb_flow.d b/Bin/rb_flow.d
new file mode 120000
index 000000000000..1a0f490cde70
--- /dev/null
+++ b/Bin/rb_flow.d
@@ -0,0 +1 @@
+../Ruby/rb_flow.d \ No newline at end of file
diff --git a/Bin/rb_flowinfo.d b/Bin/rb_flowinfo.d
new file mode 120000
index 000000000000..b8130191c8f5
--- /dev/null
+++ b/Bin/rb_flowinfo.d
@@ -0,0 +1 @@
+../Ruby/rb_flowinfo.d \ No newline at end of file
diff --git a/Bin/rb_flowtime.d b/Bin/rb_flowtime.d
new file mode 120000
index 000000000000..911ea08907cf
--- /dev/null
+++ b/Bin/rb_flowtime.d
@@ -0,0 +1 @@
+../Ruby/rb_flowtime.d \ No newline at end of file
diff --git a/Bin/rb_funccalls.d b/Bin/rb_funccalls.d
new file mode 120000
index 000000000000..2a3ac9a4adcf
--- /dev/null
+++ b/Bin/rb_funccalls.d
@@ -0,0 +1 @@
+../Ruby/rb_funccalls.d \ No newline at end of file
diff --git a/Bin/rb_lines.d b/Bin/rb_lines.d
new file mode 120000
index 000000000000..3447ccfedde3
--- /dev/null
+++ b/Bin/rb_lines.d
@@ -0,0 +1 @@
+../Ruby/rb_lines.d \ No newline at end of file
diff --git a/Bin/rb_malloc.d b/Bin/rb_malloc.d
new file mode 120000
index 000000000000..b3e2ba77de96
--- /dev/null
+++ b/Bin/rb_malloc.d
@@ -0,0 +1 @@
+../Ruby/rb_malloc.d \ No newline at end of file
diff --git a/Bin/rb_objcpu.d b/Bin/rb_objcpu.d
new file mode 120000
index 000000000000..ac7d6a22403f
--- /dev/null
+++ b/Bin/rb_objcpu.d
@@ -0,0 +1 @@
+../Ruby/rb_objcpu.d \ No newline at end of file
diff --git a/Bin/rb_objnew.d b/Bin/rb_objnew.d
new file mode 120000
index 000000000000..ca7689888eac
--- /dev/null
+++ b/Bin/rb_objnew.d
@@ -0,0 +1 @@
+../Ruby/rb_objnew.d \ No newline at end of file
diff --git a/Bin/rb_stat.d b/Bin/rb_stat.d
new file mode 120000
index 000000000000..7a0e2aef1101
--- /dev/null
+++ b/Bin/rb_stat.d
@@ -0,0 +1 @@
+../Ruby/rb_stat.d \ No newline at end of file
diff --git a/Bin/rb_syscalls.d b/Bin/rb_syscalls.d
new file mode 120000
index 000000000000..1b15e57e4647
--- /dev/null
+++ b/Bin/rb_syscalls.d
@@ -0,0 +1 @@
+../Ruby/rb_syscalls.d \ No newline at end of file
diff --git a/Bin/rb_syscolors.d b/Bin/rb_syscolors.d
new file mode 120000
index 000000000000..4fd3d6a0c423
--- /dev/null
+++ b/Bin/rb_syscolors.d
@@ -0,0 +1 @@
+../Ruby/rb_syscolors.d \ No newline at end of file
diff --git a/Bin/rb_who.d b/Bin/rb_who.d
new file mode 120000
index 000000000000..effc0ce82217
--- /dev/null
+++ b/Bin/rb_who.d
@@ -0,0 +1 @@
+../Ruby/rb_who.d \ No newline at end of file
diff --git a/Bin/readbytes.d b/Bin/readbytes.d
new file mode 120000
index 000000000000..4b82f0ced66c
--- /dev/null
+++ b/Bin/readbytes.d
@@ -0,0 +1 @@
+../Proc/readbytes.d \ No newline at end of file
diff --git a/Bin/readdist.d b/Bin/readdist.d
new file mode 120000
index 000000000000..d73e49cec889
--- /dev/null
+++ b/Bin/readdist.d
@@ -0,0 +1 @@
+../Proc/readdist.d \ No newline at end of file
diff --git a/Bin/rfileio.d b/Bin/rfileio.d
new file mode 120000
index 000000000000..a73a1bcfbfb9
--- /dev/null
+++ b/Bin/rfileio.d
@@ -0,0 +1 @@
+../FS/rfileio.d \ No newline at end of file
diff --git a/Bin/rfsio.d b/Bin/rfsio.d
new file mode 120000
index 000000000000..2dcbe2cd1493
--- /dev/null
+++ b/Bin/rfsio.d
@@ -0,0 +1 @@
+../FS/rfsio.d \ No newline at end of file
diff --git a/Bin/runocc.d b/Bin/runocc.d
new file mode 120000
index 000000000000..9b856b366296
--- /dev/null
+++ b/Bin/runocc.d
@@ -0,0 +1 @@
+../Cpu/runocc.d \ No newline at end of file
diff --git a/Bin/rwbbypid.d b/Bin/rwbbypid.d
new file mode 120000
index 000000000000..be6540134d50
--- /dev/null
+++ b/Bin/rwbbypid.d
@@ -0,0 +1 @@
+../Proc/rwbbypid.d \ No newline at end of file
diff --git a/Bin/rwbypid.d b/Bin/rwbypid.d
new file mode 120000
index 000000000000..9dcec04b7b39
--- /dev/null
+++ b/Bin/rwbypid.d
@@ -0,0 +1 @@
+../Proc/rwbypid.d \ No newline at end of file
diff --git a/Bin/rwbytype.d b/Bin/rwbytype.d
new file mode 120000
index 000000000000..a02b48d0a46d
--- /dev/null
+++ b/Bin/rwbytype.d
@@ -0,0 +1 @@
+../Proc/rwbytype.d \ No newline at end of file
diff --git a/Bin/rwsnoop b/Bin/rwsnoop
new file mode 120000
index 000000000000..3398d039476f
--- /dev/null
+++ b/Bin/rwsnoop
@@ -0,0 +1 @@
+../rwsnoop \ No newline at end of file
diff --git a/Bin/rwtop b/Bin/rwtop
new file mode 120000
index 000000000000..64e421bd72a5
--- /dev/null
+++ b/Bin/rwtop
@@ -0,0 +1 @@
+../rwtop \ No newline at end of file
diff --git a/Bin/sampleproc b/Bin/sampleproc
new file mode 120000
index 000000000000..7bdd2896b6f2
--- /dev/null
+++ b/Bin/sampleproc
@@ -0,0 +1 @@
+../Proc/sampleproc \ No newline at end of file
diff --git a/Bin/sar-c.d b/Bin/sar-c.d
new file mode 120000
index 000000000000..9a2221025781
--- /dev/null
+++ b/Bin/sar-c.d
@@ -0,0 +1 @@
+../System/sar-c.d \ No newline at end of file
diff --git a/Bin/seeksize.d b/Bin/seeksize.d
new file mode 120000
index 000000000000..3f853d79798c
--- /dev/null
+++ b/Bin/seeksize.d
@@ -0,0 +1 @@
+../Disk/seeksize.d \ No newline at end of file
diff --git a/Bin/setuids.d b/Bin/setuids.d
new file mode 120000
index 000000000000..43dbf8a72365
--- /dev/null
+++ b/Bin/setuids.d
@@ -0,0 +1 @@
+../User/setuids.d \ No newline at end of file
diff --git a/Bin/sh_calldist.d b/Bin/sh_calldist.d
new file mode 120000
index 000000000000..abc69280fe66
--- /dev/null
+++ b/Bin/sh_calldist.d
@@ -0,0 +1 @@
+../Shell/sh_calldist.d \ No newline at end of file
diff --git a/Bin/sh_calls.d b/Bin/sh_calls.d
new file mode 120000
index 000000000000..2fa61317e21c
--- /dev/null
+++ b/Bin/sh_calls.d
@@ -0,0 +1 @@
+../Shell/sh_calls.d \ No newline at end of file
diff --git a/Bin/sh_calltime.d b/Bin/sh_calltime.d
new file mode 120000
index 000000000000..35331d361607
--- /dev/null
+++ b/Bin/sh_calltime.d
@@ -0,0 +1 @@
+../Shell/sh_calltime.d \ No newline at end of file
diff --git a/Bin/sh_cpudist.d b/Bin/sh_cpudist.d
new file mode 120000
index 000000000000..d2fd1ce9d9f0
--- /dev/null
+++ b/Bin/sh_cpudist.d
@@ -0,0 +1 @@
+../Shell/sh_cpudist.d \ No newline at end of file
diff --git a/Bin/sh_cputime.d b/Bin/sh_cputime.d
new file mode 120000
index 000000000000..7188fc50a32e
--- /dev/null
+++ b/Bin/sh_cputime.d
@@ -0,0 +1 @@
+../Shell/sh_cputime.d \ No newline at end of file
diff --git a/Bin/sh_flow.d b/Bin/sh_flow.d
new file mode 120000
index 000000000000..fc02ecf33544
--- /dev/null
+++ b/Bin/sh_flow.d
@@ -0,0 +1 @@
+../Shell/sh_flow.d \ No newline at end of file
diff --git a/Bin/sh_flowinfo.d b/Bin/sh_flowinfo.d
new file mode 120000
index 000000000000..10da77a9e072
--- /dev/null
+++ b/Bin/sh_flowinfo.d
@@ -0,0 +1 @@
+../Shell/sh_flowinfo.d \ No newline at end of file
diff --git a/Bin/sh_flowtime.d b/Bin/sh_flowtime.d
new file mode 120000
index 000000000000..c3c3cb8a0cf8
--- /dev/null
+++ b/Bin/sh_flowtime.d
@@ -0,0 +1 @@
+../Shell/sh_flowtime.d \ No newline at end of file
diff --git a/Bin/sh_lines.d b/Bin/sh_lines.d
new file mode 120000
index 000000000000..918890ebfb93
--- /dev/null
+++ b/Bin/sh_lines.d
@@ -0,0 +1 @@
+../Shell/sh_lines.d \ No newline at end of file
diff --git a/Bin/sh_pidcolors.d b/Bin/sh_pidcolors.d
new file mode 120000
index 000000000000..24ae05471166
--- /dev/null
+++ b/Bin/sh_pidcolors.d
@@ -0,0 +1 @@
+../Shell/sh_pidcolors.d \ No newline at end of file
diff --git a/Bin/sh_stat.d b/Bin/sh_stat.d
new file mode 120000
index 000000000000..0dafd999b0e0
--- /dev/null
+++ b/Bin/sh_stat.d
@@ -0,0 +1 @@
+../Shell/sh_stat.d \ No newline at end of file
diff --git a/Bin/sh_syscalls.d b/Bin/sh_syscalls.d
new file mode 120000
index 000000000000..0402c76e8e02
--- /dev/null
+++ b/Bin/sh_syscalls.d
@@ -0,0 +1 @@
+../Shell/sh_syscalls.d \ No newline at end of file
diff --git a/Bin/sh_syscolors.d b/Bin/sh_syscolors.d
new file mode 120000
index 000000000000..c79f82883525
--- /dev/null
+++ b/Bin/sh_syscolors.d
@@ -0,0 +1 @@
+../Shell/sh_syscolors.d \ No newline at end of file
diff --git a/Bin/sh_wasted.d b/Bin/sh_wasted.d
new file mode 120000
index 000000000000..564fc98adfeb
--- /dev/null
+++ b/Bin/sh_wasted.d
@@ -0,0 +1 @@
+../Shell/sh_wasted.d \ No newline at end of file
diff --git a/Bin/sh_who.d b/Bin/sh_who.d
new file mode 120000
index 000000000000..ca00fab11e4d
--- /dev/null
+++ b/Bin/sh_who.d
@@ -0,0 +1 @@
+../Shell/sh_who.d \ No newline at end of file
diff --git a/Bin/shellsnoop b/Bin/shellsnoop
new file mode 120000
index 000000000000..84169abed066
--- /dev/null
+++ b/Bin/shellsnoop
@@ -0,0 +1 @@
+../Apps/shellsnoop \ No newline at end of file
diff --git a/Bin/shortlived.d b/Bin/shortlived.d
new file mode 120000
index 000000000000..6c234cf6dc4b
--- /dev/null
+++ b/Bin/shortlived.d
@@ -0,0 +1 @@
+../Proc/shortlived.d \ No newline at end of file
diff --git a/Bin/sigdist.d b/Bin/sigdist.d
new file mode 120000
index 000000000000..838da2686546
--- /dev/null
+++ b/Bin/sigdist.d
@@ -0,0 +1 @@
+../Proc/sigdist.d \ No newline at end of file
diff --git a/Bin/stacksize.d b/Bin/stacksize.d
new file mode 120000
index 000000000000..cb6fec40bb79
--- /dev/null
+++ b/Bin/stacksize.d
@@ -0,0 +1 @@
+../Proc/stacksize.d \ No newline at end of file
diff --git a/Bin/statsnoop b/Bin/statsnoop
new file mode 120000
index 000000000000..445e361554aa
--- /dev/null
+++ b/Bin/statsnoop
@@ -0,0 +1 @@
+../statsnoop \ No newline at end of file
diff --git a/Bin/swapinfo.d b/Bin/swapinfo.d
new file mode 120000
index 000000000000..e5cd10f76920
--- /dev/null
+++ b/Bin/swapinfo.d
@@ -0,0 +1 @@
+../Mem/swapinfo.d \ No newline at end of file
diff --git a/Bin/sysbypid.d b/Bin/sysbypid.d
new file mode 120000
index 000000000000..761ada95b82f
--- /dev/null
+++ b/Bin/sysbypid.d
@@ -0,0 +1 @@
+../Proc/sysbypid.d \ No newline at end of file
diff --git a/Bin/syscallbypid.d b/Bin/syscallbypid.d
new file mode 120000
index 000000000000..eca83c7bf2d6
--- /dev/null
+++ b/Bin/syscallbypid.d
@@ -0,0 +1 @@
+../Proc/syscallbypid.d \ No newline at end of file
diff --git a/Bin/syscallbyproc.d b/Bin/syscallbyproc.d
new file mode 120000
index 000000000000..0260655574bb
--- /dev/null
+++ b/Bin/syscallbyproc.d
@@ -0,0 +1 @@
+../Proc/syscallbyproc.d \ No newline at end of file
diff --git a/Bin/syscallbysysc.d b/Bin/syscallbysysc.d
new file mode 120000
index 000000000000..43258f1ebdc4
--- /dev/null
+++ b/Bin/syscallbysysc.d
@@ -0,0 +1 @@
+../System/syscallbysysc.d \ No newline at end of file
diff --git a/Bin/tcl_calldist.d b/Bin/tcl_calldist.d
new file mode 120000
index 000000000000..6e3cf23de470
--- /dev/null
+++ b/Bin/tcl_calldist.d
@@ -0,0 +1 @@
+../Tcl/tcl_calldist.d \ No newline at end of file
diff --git a/Bin/tcl_calls.d b/Bin/tcl_calls.d
new file mode 120000
index 000000000000..3a48d0b3eda1
--- /dev/null
+++ b/Bin/tcl_calls.d
@@ -0,0 +1 @@
+../Tcl/tcl_calls.d \ No newline at end of file
diff --git a/Bin/tcl_calltime.d b/Bin/tcl_calltime.d
new file mode 120000
index 000000000000..32cead5d1edc
--- /dev/null
+++ b/Bin/tcl_calltime.d
@@ -0,0 +1 @@
+../Tcl/tcl_calltime.d \ No newline at end of file
diff --git a/Bin/tcl_cpudist.d b/Bin/tcl_cpudist.d
new file mode 120000
index 000000000000..1724115a9b64
--- /dev/null
+++ b/Bin/tcl_cpudist.d
@@ -0,0 +1 @@
+../Tcl/tcl_cpudist.d \ No newline at end of file
diff --git a/Bin/tcl_cputime.d b/Bin/tcl_cputime.d
new file mode 120000
index 000000000000..e8269db5c879
--- /dev/null
+++ b/Bin/tcl_cputime.d
@@ -0,0 +1 @@
+../Tcl/tcl_cputime.d \ No newline at end of file
diff --git a/Bin/tcl_flow.d b/Bin/tcl_flow.d
new file mode 120000
index 000000000000..4f3e01f16541
--- /dev/null
+++ b/Bin/tcl_flow.d
@@ -0,0 +1 @@
+../Tcl/tcl_flow.d \ No newline at end of file
diff --git a/Bin/tcl_flowtime.d b/Bin/tcl_flowtime.d
new file mode 120000
index 000000000000..3664f7a1100e
--- /dev/null
+++ b/Bin/tcl_flowtime.d
@@ -0,0 +1 @@
+../Tcl/tcl_flowtime.d \ No newline at end of file
diff --git a/Bin/tcl_ins.d b/Bin/tcl_ins.d
new file mode 120000
index 000000000000..d7480340a0ff
--- /dev/null
+++ b/Bin/tcl_ins.d
@@ -0,0 +1 @@
+../Tcl/tcl_ins.d \ No newline at end of file
diff --git a/Bin/tcl_insflow.d b/Bin/tcl_insflow.d
new file mode 120000
index 000000000000..9f716bda057e
--- /dev/null
+++ b/Bin/tcl_insflow.d
@@ -0,0 +1 @@
+../Tcl/tcl_insflow.d \ No newline at end of file
diff --git a/Bin/tcl_proccalls.d b/Bin/tcl_proccalls.d
new file mode 120000
index 000000000000..704e0b5cf20f
--- /dev/null
+++ b/Bin/tcl_proccalls.d
@@ -0,0 +1 @@
+../Tcl/tcl_proccalls.d \ No newline at end of file
diff --git a/Bin/tcl_procflow.d b/Bin/tcl_procflow.d
new file mode 120000
index 000000000000..51da9dcd15bf
--- /dev/null
+++ b/Bin/tcl_procflow.d
@@ -0,0 +1 @@
+../Tcl/tcl_procflow.d \ No newline at end of file
diff --git a/Bin/tcl_stat.d b/Bin/tcl_stat.d
new file mode 120000
index 000000000000..7f9659a2e8c1
--- /dev/null
+++ b/Bin/tcl_stat.d
@@ -0,0 +1 @@
+../Tcl/tcl_stat.d \ No newline at end of file
diff --git a/Bin/tcl_syscalls.d b/Bin/tcl_syscalls.d
new file mode 120000
index 000000000000..aec76739ca2c
--- /dev/null
+++ b/Bin/tcl_syscalls.d
@@ -0,0 +1 @@
+../Tcl/tcl_syscalls.d \ No newline at end of file
diff --git a/Bin/tcl_syscolors.d b/Bin/tcl_syscolors.d
new file mode 120000
index 000000000000..890ea5ff3a2c
--- /dev/null
+++ b/Bin/tcl_syscolors.d
@@ -0,0 +1 @@
+../Tcl/tcl_syscolors.d \ No newline at end of file
diff --git a/Bin/tcl_who.d b/Bin/tcl_who.d
new file mode 120000
index 000000000000..7917b5ed7bab
--- /dev/null
+++ b/Bin/tcl_who.d
@@ -0,0 +1 @@
+../Tcl/tcl_who.d \ No newline at end of file
diff --git a/Bin/tcpsnoop b/Bin/tcpsnoop
new file mode 120000
index 000000000000..7f7b37d4394d
--- /dev/null
+++ b/Bin/tcpsnoop
@@ -0,0 +1 @@
+../Net/tcpsnoop \ No newline at end of file
diff --git a/Bin/tcpsnoop.d b/Bin/tcpsnoop.d
new file mode 120000
index 000000000000..ad9ccf93a10d
--- /dev/null
+++ b/Bin/tcpsnoop.d
@@ -0,0 +1 @@
+../Net/tcpsnoop.d \ No newline at end of file
diff --git a/Bin/tcpsnoop_snv b/Bin/tcpsnoop_snv
new file mode 120000
index 000000000000..7ea5a09274d6
--- /dev/null
+++ b/Bin/tcpsnoop_snv
@@ -0,0 +1 @@
+../Net/tcpsnoop_snv \ No newline at end of file
diff --git a/Bin/tcpsnoop_snv.d b/Bin/tcpsnoop_snv.d
new file mode 120000
index 000000000000..a2321e0d5947
--- /dev/null
+++ b/Bin/tcpsnoop_snv.d
@@ -0,0 +1 @@
+../Net/tcpsnoop_snv.d \ No newline at end of file
diff --git a/Bin/tcpstat.d b/Bin/tcpstat.d
new file mode 120000
index 000000000000..176f0e322756
--- /dev/null
+++ b/Bin/tcpstat.d
@@ -0,0 +1 @@
+../Net/tcpstat.d \ No newline at end of file
diff --git a/Bin/tcptop b/Bin/tcptop
new file mode 120000
index 000000000000..a97fec359309
--- /dev/null
+++ b/Bin/tcptop
@@ -0,0 +1 @@
+../Net/tcptop \ No newline at end of file
diff --git a/Bin/tcptop_snv b/Bin/tcptop_snv
new file mode 120000
index 000000000000..ad75a7b77596
--- /dev/null
+++ b/Bin/tcptop_snv
@@ -0,0 +1 @@
+../Net/tcptop_snv \ No newline at end of file
diff --git a/Bin/tcpwdist.d b/Bin/tcpwdist.d
new file mode 120000
index 000000000000..0be2a4139776
--- /dev/null
+++ b/Bin/tcpwdist.d
@@ -0,0 +1 @@
+../Net/tcpwdist.d \ No newline at end of file
diff --git a/Bin/threaded.d b/Bin/threaded.d
new file mode 120000
index 000000000000..b9febd847996
--- /dev/null
+++ b/Bin/threaded.d
@@ -0,0 +1 @@
+../Proc/threaded.d \ No newline at end of file
diff --git a/Bin/topsyscall b/Bin/topsyscall
new file mode 120000
index 000000000000..b9a2eec61fac
--- /dev/null
+++ b/Bin/topsyscall
@@ -0,0 +1 @@
+../System/topsyscall \ No newline at end of file
diff --git a/Bin/topsysproc b/Bin/topsysproc
new file mode 120000
index 000000000000..d523f507cf9e
--- /dev/null
+++ b/Bin/topsysproc
@@ -0,0 +1 @@
+../Proc/topsysproc \ No newline at end of file
diff --git a/Bin/udpstat.d b/Bin/udpstat.d
new file mode 120000
index 000000000000..11d0bca5f36f
--- /dev/null
+++ b/Bin/udpstat.d
@@ -0,0 +1 @@
+../Net/udpstat.d \ No newline at end of file
diff --git a/Bin/uname-a.d b/Bin/uname-a.d
new file mode 120000
index 000000000000..11251757f57e
--- /dev/null
+++ b/Bin/uname-a.d
@@ -0,0 +1 @@
+../System/uname-a.d \ No newline at end of file
diff --git a/Bin/vmbypid.d b/Bin/vmbypid.d
new file mode 120000
index 000000000000..16e5ac4edadb
--- /dev/null
+++ b/Bin/vmbypid.d
@@ -0,0 +1 @@
+../Mem/vmbypid.d \ No newline at end of file
diff --git a/Bin/vmstat-p.d b/Bin/vmstat-p.d
new file mode 120000
index 000000000000..a75e5a1b1544
--- /dev/null
+++ b/Bin/vmstat-p.d
@@ -0,0 +1 @@
+../Mem/vmstat-p.d \ No newline at end of file
diff --git a/Bin/vmstat.d b/Bin/vmstat.d
new file mode 120000
index 000000000000..395ba5f80858
--- /dev/null
+++ b/Bin/vmstat.d
@@ -0,0 +1 @@
+../Mem/vmstat.d \ No newline at end of file
diff --git a/Bin/vopstat b/Bin/vopstat
new file mode 120000
index 000000000000..f38b57905d6e
--- /dev/null
+++ b/Bin/vopstat
@@ -0,0 +1 @@
+../FS/vopstat \ No newline at end of file
diff --git a/Bin/weblatency.d b/Bin/weblatency.d
new file mode 120000
index 000000000000..c16bb2ee361b
--- /dev/null
+++ b/Bin/weblatency.d
@@ -0,0 +1 @@
+../Apps/weblatency.d \ No newline at end of file
diff --git a/Bin/whatexec.d b/Bin/whatexec.d
new file mode 120000
index 000000000000..660ff83826b7
--- /dev/null
+++ b/Bin/whatexec.d
@@ -0,0 +1 @@
+../Kernel/whatexec.d \ No newline at end of file
diff --git a/Bin/woof.d b/Bin/woof.d
new file mode 120000
index 000000000000..a380d7c2f2ca
--- /dev/null
+++ b/Bin/woof.d
@@ -0,0 +1 @@
+../Misc/woof.d \ No newline at end of file
diff --git a/Bin/wpm.d b/Bin/wpm.d
new file mode 120000
index 000000000000..fee9c99a1efb
--- /dev/null
+++ b/Bin/wpm.d
@@ -0,0 +1 @@
+../Misc/wpm.d \ No newline at end of file
diff --git a/Bin/writebytes.d b/Bin/writebytes.d
new file mode 120000
index 000000000000..586cbd75ba86
--- /dev/null
+++ b/Bin/writebytes.d
@@ -0,0 +1 @@
+../Proc/writebytes.d \ No newline at end of file
diff --git a/Bin/writedist.d b/Bin/writedist.d
new file mode 120000
index 000000000000..3710f132fe16
--- /dev/null
+++ b/Bin/writedist.d
@@ -0,0 +1 @@
+../Proc/writedist.d \ No newline at end of file
diff --git a/Bin/xcallsbypid.d b/Bin/xcallsbypid.d
new file mode 120000
index 000000000000..08c7feca8235
--- /dev/null
+++ b/Bin/xcallsbypid.d
@@ -0,0 +1 @@
+../Cpu/xcallsbypid.d \ No newline at end of file
diff --git a/Bin/xvmstat b/Bin/xvmstat
new file mode 120000
index 000000000000..24008fbb4672
--- /dev/null
+++ b/Bin/xvmstat
@@ -0,0 +1 @@
+../Mem/xvmstat \ No newline at end of file
diff --git a/Bin/zvmstat b/Bin/zvmstat
new file mode 120000
index 000000000000..41c7dbbb31e0
--- /dev/null
+++ b/Bin/zvmstat
@@ -0,0 +1 @@
+../Zones/zvmstat \ No newline at end of file
diff --git a/Code/Java/Func_abc.java b/Code/Java/Func_abc.java
new file mode 100644
index 000000000000..c14012e4988e
--- /dev/null
+++ b/Code/Java/Func_abc.java
@@ -0,0 +1,26 @@
+public class Func_abc {
+ public static void func_c() {
+ System.out.println("Function C");
+ try {
+ Thread.currentThread().sleep(1000);
+ } catch (Exception e) { }
+ }
+ public static void func_b() {
+ System.out.println("Function B");
+ try {
+ Thread.currentThread().sleep(1000);
+ } catch (Exception e) { }
+ func_c();
+ }
+ public static void func_a() {
+ System.out.println("Function A");
+ try {
+ Thread.currentThread().sleep(1000);
+ } catch (Exception e) { }
+ func_b();
+ }
+
+ public static void main(String[] args) {
+ func_a();
+ }
+}
diff --git a/Code/Java/Func_loop.java b/Code/Java/Func_loop.java
new file mode 100644
index 000000000000..81be852bb7f1
--- /dev/null
+++ b/Code/Java/Func_loop.java
@@ -0,0 +1,19 @@
+public class Func_loop {
+ public static void func_c() {
+ System.out.println("Function C");
+ while (true) {
+ }
+ }
+ public static void func_b() {
+ System.out.println("Function B");
+ func_c();
+ }
+ public static void func_a() {
+ System.out.println("Function A");
+ func_b();
+ }
+
+ public static void main(String[] args) {
+ func_a();
+ }
+}
diff --git a/Code/JavaScript/func_clock.html b/Code/JavaScript/func_clock.html
new file mode 100644
index 000000000000..c25610b30f2c
--- /dev/null
+++ b/Code/JavaScript/func_clock.html
@@ -0,0 +1,39 @@
+<HTML>
+<HEAD>
+<TITLE>func_clock, JavaScript</TITLE>
+<SCRIPT type="text/javascript">
+function func_c() {
+ document.getElementById('now').innerHTML += "Function C<br>"
+ for (i = 0; i < 30000; i++) {
+ j = i + 1
+ }
+}
+
+function func_b() {
+ document.getElementById('now').innerHTML += "Function B<br>"
+ for (i = 0; i < 20000; i++) {
+ j = i + 1
+ }
+ func_c()
+}
+
+function func_a() {
+ document.getElementById('now').innerHTML += "Function A<br>"
+ for (i = 0; i < 10000; i++) {
+ j = i + 1
+ }
+ func_b()
+}
+
+function start() {
+ now = new Date()
+ document.getElementById('now').innerHTML = now + "<br>"
+ func_a()
+ var timeout = setTimeout('start()', 1000)
+}
+</SCRIPT>
+</HEAD>
+<BODY onload="start()">
+<DIV id="now"></DIV>
+</BODY>
+</HTML>
diff --git a/Code/JavaScript/func_slow.html b/Code/JavaScript/func_slow.html
new file mode 100644
index 000000000000..14fdfda3870c
--- /dev/null
+++ b/Code/JavaScript/func_slow.html
@@ -0,0 +1,31 @@
+<HTML>
+<HEAD><TITLE>func_slow, JavaScript</TITLE></HEAD>
+<BODY>
+<SCRIPT type="text/javascript">
+function func_c() {
+ document.write("Function C<br>")
+ for (i = 0; i < 30000; i++) {
+ j = i + 1
+ }
+}
+
+function func_b() {
+ document.write("Function B<br>")
+ for (i = 0; i < 20000; i++) {
+ j = i + 1
+ }
+ func_c()
+}
+
+function func_a() {
+ document.write("Function A<br>")
+ for (i = 0; i < 10000; i++) {
+ j = i + 1
+ }
+ func_b()
+}
+
+func_a()
+</SCRIPT>
+</BODY>
+</HTML>
diff --git a/Code/Perl/func_abc.pl b/Code/Perl/func_abc.pl
new file mode 100755
index 000000000000..394f1c2b245a
--- /dev/null
+++ b/Code/Perl/func_abc.pl
@@ -0,0 +1,20 @@
+#!./perl -w
+
+sub func_c {
+ print "Function C\n";
+ sleep 1;
+}
+
+sub func_b {
+ print "Function B\n";
+ sleep 1;
+ func_c();
+}
+
+sub func_a {
+ print "Function A\n";
+ sleep 1;
+ func_b();
+}
+
+func_a();
diff --git a/Code/Perl/func_malloc.pl b/Code/Perl/func_malloc.pl
new file mode 100755
index 000000000000..5340c82b2cdc
--- /dev/null
+++ b/Code/Perl/func_malloc.pl
@@ -0,0 +1,18 @@
+#!./perl -w
+
+sub func_c {
+ print "Function C\n";
+}
+
+sub func_b {
+ print "Function B\n";
+ my $b = "B" x 100_000;
+ func_c();
+}
+
+sub func_a {
+ print "Function A\n";
+ func_b();
+}
+
+func_a();
diff --git a/Code/Perl/func_slow.pl b/Code/Perl/func_slow.pl
new file mode 100755
index 000000000000..f32d09ed9bf8
--- /dev/null
+++ b/Code/Perl/func_slow.pl
@@ -0,0 +1,20 @@
+#!./perl -w
+
+sub func_c {
+ print "Function C\n";
+ for (my $i = 0; $i < 3000000; $i++) { my $j = $i + 1; }
+}
+
+sub func_b {
+ print "Function B\n";
+ for (my $i = 0; $i < 2000000; $i++) { my $j = $i + 1 ; }
+ func_c();
+}
+
+sub func_a {
+ print "Function A\n";
+ for (my $i = 0; $i < 1000000; $i++) { my $j = $i + 1; }
+ func_b();
+}
+
+func_a();
diff --git a/Code/Perl/hello.pl b/Code/Perl/hello.pl
new file mode 100755
index 000000000000..3ca70a2847c8
--- /dev/null
+++ b/Code/Perl/hello.pl
@@ -0,0 +1,3 @@
+#!./perl
+
+print "Hello World!\n";
diff --git a/Code/Perl/hello_strict.pl b/Code/Perl/hello_strict.pl
new file mode 100755
index 000000000000..78003a971448
--- /dev/null
+++ b/Code/Perl/hello_strict.pl
@@ -0,0 +1,5 @@
+#!./perl -w
+
+use strict;
+
+print "Hello World!\n";
diff --git a/Code/Php/func_abc.php b/Code/Php/func_abc.php
new file mode 100644
index 000000000000..916561157881
--- /dev/null
+++ b/Code/Php/func_abc.php
@@ -0,0 +1,23 @@
+<?php
+function func_c()
+{
+ echo "Function C\n";
+ sleep(1);
+}
+
+function func_b()
+{
+ echo "Function B\n";
+ sleep(1);
+ func_c();
+}
+
+function func_a()
+{
+ echo "Function A\n";
+ sleep(1);
+ func_b();
+}
+
+func_a();
+?>
diff --git a/Code/Python/func_abc.py b/Code/Python/func_abc.py
new file mode 100755
index 000000000000..0d4919fb8930
--- /dev/null
+++ b/Code/Python/func_abc.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+import time
+
+def func_c():
+ print "Function C"
+ time.sleep(1)
+
+def func_b():
+ print "Function B"
+ time.sleep(1)
+ func_c()
+
+def func_a():
+ print "Function A"
+ time.sleep(1)
+ func_b()
+
+func_a()
diff --git a/Code/Python/func_slow.py b/Code/Python/func_slow.py
new file mode 100755
index 000000000000..9cba9c5b1204
--- /dev/null
+++ b/Code/Python/func_slow.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+
+def func_c():
+ print "Function C"
+ i = 0
+ while (i < 3000000):
+ i = i + 1
+ j = i + 1
+
+def func_b():
+ print "Function B"
+ i = 0
+ while (i < 2000000):
+ i = i + 1
+ j = i + 1
+ func_c()
+
+def func_a():
+ print "Function A"
+ i = 0
+ while (i < 1000000):
+ i = i + 1
+ j = i + 1
+ func_b()
+
+func_a()
diff --git a/Code/Readme b/Code/Readme
new file mode 100644
index 000000000000..f8b16d79b7e4
--- /dev/null
+++ b/Code/Readme
@@ -0,0 +1,16 @@
+Code - Example Programs
+
+ This directory contains example software sorted by language, which may
+ be used as the target for DTrace scripts. These examples are simple and
+ to the point, and are intended as example targets for when learing
+ DTrace.
+
+ Some people attempt to learn DTrace by tracing their complex real
+ world application first. That's the hard way. Try these programs instead,
+ and once you are confident here, move onto harder targets.
+
+ Some of these programs feature in the example files in the /Examples
+ directory.
+
+ This directory does not contain DTrace scripts.
+
diff --git a/Code/Ruby/func_abc.rb b/Code/Ruby/func_abc.rb
new file mode 100755
index 000000000000..75adaf9f7ff1
--- /dev/null
+++ b/Code/Ruby/func_abc.rb
@@ -0,0 +1,20 @@
+#!./ruby -w
+
+def func_c
+ print "Function C\n"
+ sleep 1
+end
+
+def func_b
+ print "Function B\n"
+ sleep 1
+ func_c
+end
+
+def func_a
+ print "Function A\n"
+ sleep 1
+ func_b
+end
+
+func_a
diff --git a/Code/Ruby/func_slow.rb b/Code/Ruby/func_slow.rb
new file mode 100755
index 000000000000..87a498c6a3b1
--- /dev/null
+++ b/Code/Ruby/func_slow.rb
@@ -0,0 +1,32 @@
+#!./ruby -w
+
+def func_c
+ print "Function C\n"
+ i = 0
+ while i < 300000
+ i = i + 1
+ j = i + 1
+ end
+end
+
+def func_b
+ print "Function B\n"
+ i = 0
+ while i < 200000
+ i = i + 1
+ j = i + 1
+ end
+ func_c
+end
+
+def func_a
+ print "Function A\n"
+ i = 0
+ while i < 100000
+ i = i + 1
+ j = i + 1
+ end
+ func_b
+end
+
+func_a
diff --git a/Code/Shell/func_abc.sh b/Code/Shell/func_abc.sh
new file mode 100755
index 000000000000..b44ce570ab93
--- /dev/null
+++ b/Code/Shell/func_abc.sh
@@ -0,0 +1,23 @@
+#!./sh
+
+func_c()
+{
+ echo "Function C"
+ sleep 1
+}
+
+func_b()
+{
+ echo "Function B"
+ sleep 1
+ func_c
+}
+
+func_a()
+{
+ echo "Function A"
+ sleep 1
+ func_b
+}
+
+func_a
diff --git a/Code/Shell/func_slow.sh b/Code/Shell/func_slow.sh
new file mode 100755
index 000000000000..3407646f9c64
--- /dev/null
+++ b/Code/Shell/func_slow.sh
@@ -0,0 +1,35 @@
+#!./sh
+
+func_c()
+{
+ echo "Function C"
+ i=0
+ while [ $i -lt 300 ]
+ do
+ i=`expr $i + 1`
+ done
+}
+
+func_b()
+{
+ echo "Function B"
+ i=0
+ while [ $i -lt 200 ]
+ do
+ i=`expr $i + 1`
+ done
+ func_c
+}
+
+func_a()
+{
+ echo "Function A"
+ i=0
+ while [ $i -lt 100 ]
+ do
+ i=`expr $i + 1`
+ done
+ func_b
+}
+
+func_a
diff --git a/Code/Shell/func_waste.sh b/Code/Shell/func_waste.sh
new file mode 100755
index 000000000000..bfeeecb4ef4e
--- /dev/null
+++ b/Code/Shell/func_waste.sh
@@ -0,0 +1,23 @@
+#!./sh
+
+func_c()
+{
+ /usr/bin/echo "Function C"
+ sleep 1
+}
+
+func_b()
+{
+ /usr/bin/echo "Function B"
+ sleep 1
+ func_c
+}
+
+func_a()
+{
+ /usr/bin/echo "Function A"
+ sleep 1
+ func_b
+}
+
+func_a
diff --git a/Code/Tcl/func_abc.tcl b/Code/Tcl/func_abc.tcl
new file mode 100644
index 000000000000..c84acb074882
--- /dev/null
+++ b/Code/Tcl/func_abc.tcl
@@ -0,0 +1,20 @@
+#!./tclsh
+
+proc func_c {} {
+ puts "Function C"
+ after 1000
+}
+
+proc func_b {} {
+ puts "Function B"
+ after 1000
+ func_c
+}
+
+proc func_a {} {
+ puts "Function A"
+ after 1000
+ func_b
+}
+
+func_a
diff --git a/Code/Tcl/func_slow.tcl b/Code/Tcl/func_slow.tcl
new file mode 100644
index 000000000000..d4fc59894680
--- /dev/null
+++ b/Code/Tcl/func_slow.tcl
@@ -0,0 +1,29 @@
+#!./tclsh
+
+proc func_c {} {
+ puts "Function C"
+ set i 0
+ while {$i < 300000} {
+ set i [expr $i + 1]
+ }
+}
+
+proc func_b {} {
+ puts "Function B"
+ set i 0
+ while {$i < 200000} {
+ set i [expr $i + 1]
+ }
+ func_c
+}
+
+proc func_a {} {
+ puts "Function A"
+ set i 0
+ while {$i < 100000} {
+ set i [expr $i + 1]
+ }
+ func_b
+}
+
+func_a
diff --git a/Cpu/Readme b/Cpu/Readme
new file mode 100644
index 000000000000..e0f8698c71b2
--- /dev/null
+++ b/Cpu/Readme
@@ -0,0 +1,3 @@
+Cpu - CPU based analysis
+
+ This would include activity by CPU.
diff --git a/Cpu/cputypes.d b/Cpu/cputypes.d
new file mode 100755
index 000000000000..213af9efa935
--- /dev/null
+++ b/Cpu/cputypes.d
@@ -0,0 +1,66 @@
+#!/usr/sbin/dtrace -s
+/*
+ * cputypes.d - list CPU type info.
+ * Written using DTrace (Solaris 10 3/05).
+ *
+ * $Id: cputypes.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: cputypes.d
+ *
+ * FIELDS:
+ * CPU CPU ID
+ * CHIP chip ID
+ * PSET processor set ID
+ * LGRP latency group ID
+ * CLOCK clock speed, MHz
+ * TYPE CPU type
+ * FPU floating point identifier types
+ *
+ * SEE ALSO: psrinfo(1M)
+ * /usr/include/sys/processor.h
+ *
+ * COPYRIGHT: Copyright (c) 2005 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 27-Jun-2005 Brendan Gregg Created this.
+ * 27-Jun-2005 " " Last update.
+ */
+
+#pragma D option quiet
+#pragma D option bufsize=64k
+
+dtrace:::BEGIN
+{
+ printf("%4s %4s %4s %4s %6s %-16s %s\n",
+ "CPU", "CHIP", "PSET", "LGRP", "CLOCK", "TYPE", "FPU");
+ done[0] = 0;
+}
+
+profile:::profile-10ms
+/done[cpu] == 0/
+{
+ printf("%4d %4d %4d %4d %6d %-16s %s\n",
+ cpu, curcpu->cpu_chip, curcpu->cpu_pset,
+ curcpu->cpu_lgrp, curcpu->cpu_info.pi_clock,
+ stringof(curcpu->cpu_info.pi_processor_type),
+ stringof(curcpu->cpu_info.pi_fputypes));
+ done[cpu]++;
+}
+
+profile:::tick-100ms
+{
+ exit(0);
+}
diff --git a/Cpu/cpuwalk.d b/Cpu/cpuwalk.d
new file mode 100755
index 000000000000..495f64bb5f95
--- /dev/null
+++ b/Cpu/cpuwalk.d
@@ -0,0 +1,72 @@
+#!/usr/sbin/dtrace -s
+/*
+ * cpuwalk.d - Measure which CPUs a process runs on.
+ * Written using DTrace (Solaris 10 3/05)
+ *
+ * This program is for multi-CPU servers, and can help identify if a process
+ * is running on multiple CPUs concurrently or not.
+ *
+ * $Id: cpuwalk.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: cpuwalk.d [duration]
+ * eg,
+ * cpuwalk.d 10 # sample for 10 seconds
+ * cpuwalk.d # sample until Ctrl-C is hit
+ *
+ * FIELDS:
+ * value CPU id
+ * count Number of 1000 hz samples on this CPU
+ *
+ * COPYRIGHT: Copyright (c) 2005 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 22-Sep-2005 Brendan Gregg Created this.
+ * 14-Feb-2006 " " Last update.
+ */
+
+#pragma D option quiet
+#pragma D option defaultargs
+
+inline int MAXCPUID = 1024;
+
+dtrace:::BEGIN
+{
+ $1 ? printf("Sampling...\n") :
+ printf("Sampling... Hit Ctrl-C to end.\n");
+ seconds = 0;
+}
+
+profile:::profile-1000hz
+/pid/
+{
+ @sample[pid, execname] = lquantize(cpu, 0, MAXCPUID, 1);
+}
+
+profile:::tick-1sec
+{
+ seconds++;
+}
+
+profile:::tick-1sec
+/seconds == $1/
+{
+ exit(0);
+}
+
+dtrace:::END
+{
+ printa("\n PID: %-8d CMD: %s\n%@d", @sample);
+}
diff --git a/Cpu/dispqlen.d b/Cpu/dispqlen.d
new file mode 100755
index 000000000000..46742c5a02b1
--- /dev/null
+++ b/Cpu/dispqlen.d
@@ -0,0 +1,52 @@
+#!/usr/sbin/dtrace -s
+/*
+ * dispqlen.d - dispatcher queue length by CPU.
+ * Written using DTrace (Solaris 10 3/05).
+ *
+ * $Id: dispqlen.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: dispqlen.d # hit Ctrl-C to end sample
+ *
+ * NOTES: The dispatcher queue length is an indication of CPU saturation.
+ * It is not an indicatior of utilisation - the CPUs may or may not be
+ * utilised when the dispatcher queue reports a length of zero.
+ *
+ * SEE ALSO: uptime(1M)
+ *
+ * COPYRIGHT: Copyright (c) 2005 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 27-Jun-2005 Brendan Gregg Created this.
+ * 14-Feb-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+dtrace:::BEGIN
+{
+ printf("Sampling... Hit Ctrl-C to end.\n");
+}
+
+profile:::profile-1000hz
+{
+ @queue[cpu] =
+ lquantize(curthread->t_cpu->cpu_disp->disp_nrunnable, 0, 64, 1);
+}
+
+dtrace:::END
+{
+ printa(" CPU %d%@d\n", @queue);
+}
diff --git a/Cpu/intbycpu.d b/Cpu/intbycpu.d
new file mode 100755
index 000000000000..606f40280564
--- /dev/null
+++ b/Cpu/intbycpu.d
@@ -0,0 +1,49 @@
+#!/usr/sbin/dtrace -s
+/*
+ * intbycpu.d - interrupts by CPU.
+ * Written using DTrace (Solaris 10 3/05).
+ *
+ * $Id: intbycpu.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: intbycpu.d # hit Ctrl-C to end sample
+ *
+ * FIELDS:
+ * CPU CPU number
+ * INTERRUPTS number of interrupts in sample
+ *
+ * This is based on a DTrace OneLiner from the DTraceToolkit.
+ *
+ * COPYRIGHT: Copyright (c) 2005, 2006 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 15-May-2005 Brendan Gregg Created this.
+ * 20-Apr-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+dtrace:::BEGIN
+{
+ printf("Tracing... Hit Ctrl-C to end.\n");
+}
+
+sdt:::interrupt-start { @num[cpu] = count(); }
+
+dtrace:::END
+{
+ printf("%-16s %16s\n", "CPU", "INTERRUPTS");
+ printa("%-16d %@16d\n", @num);
+}
diff --git a/Cpu/intoncpu.d b/Cpu/intoncpu.d
new file mode 100755
index 000000000000..b32685ab689b
--- /dev/null
+++ b/Cpu/intoncpu.d
@@ -0,0 +1,66 @@
+#!/usr/sbin/dtrace -s
+/*
+ * intoncpu.d - print interrupt on-cpu usage.
+ * Written using DTrace (Solaris 10 3/05)
+ *
+ * $Id: intoncpu.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: intoncpu.d # wait several seconds, then hit Ctrl-C
+ *
+ * FIELDS:
+ * value Time interrupt thread was on-cpu, ns
+ * count Number of occurrences of at least this time
+ *
+ * BASED ON: /usr/demo/dtrace/intr.d
+ *
+ * SEE ALSO: DTrace Guide "sdt Provider" chapter (docs.sun.com)
+ * intrstat(1M)
+ *
+ * PORTIONS: Copyright (c) 2005, 2006 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 09-May-2005 Brendan Gregg Created this.
+ * 20-Apr-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+dtrace:::BEGIN
+{
+ printf("Tracing... Hit Ctrl-C to end.\n");
+}
+
+sdt:::interrupt-start
+{
+ self->ts = vtimestamp;
+}
+
+sdt:::interrupt-complete
+/self->ts && arg0 != 0/
+{
+ this->devi = (struct dev_info *)arg0;
+ /* this checks the pointer is valid, */
+ self->name = this->devi != 0 ?
+ stringof(`devnamesp[this->devi->devi_major].dn_name) : "?";
+ this->inst = this->devi != 0 ? this->devi->devi_instance : 0;
+ @Time[self->name, this->inst] = quantize(vtimestamp - self->ts);
+ self->name = 0;
+}
+
+dtrace:::END
+{
+ printa("%s%d\n%@d", @Time);
+}
diff --git a/Cpu/inttimes.d b/Cpu/inttimes.d
new file mode 100755
index 000000000000..926a566553e5
--- /dev/null
+++ b/Cpu/inttimes.d
@@ -0,0 +1,73 @@
+#!/usr/sbin/dtrace -s
+/*
+ * inttimes.d - print interrupt on-cpu time.
+ * Written using DTrace (Solaris 10 3/05)
+ *
+ * $Id: inttimes.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: inttimes.d # wait several seconds, then hit Ctrl-C
+ *
+ * FIELDS:
+ * DEVICE instance name of device driver
+ * TIME (ns) sum of time spent servicing interrupt (ns)
+ *
+ * BASED ON: /usr/demo/dtrace/intr.d
+ *
+ * SEE ALSO:
+ * DTrace Guide "sdt Provider" chapter (docs.sun.com)
+ * intrstat(1M)
+ *
+ * PORTIONS: Copyright (c) 2005 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 28-Jun-2005 Brendan Gregg Created this.
+ * 20-Apr-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+dtrace:::BEGIN
+{
+ printf("Tracing... Hit Ctrl-C to end.\n");
+}
+
+sdt:::interrupt-start
+{
+ self->ts = vtimestamp;
+}
+
+sdt:::interrupt-complete
+/self->ts && arg0 != 0/
+{
+ this->devi = (struct dev_info *)arg0;
+ /* this checks the pointer is valid, */
+ self->name = this->devi != 0 ?
+ stringof(`devnamesp[this->devi->devi_major].dn_name) : "?";
+ this->inst = this->devi != 0 ? this->devi->devi_instance : 0;
+ @num[self->name, this->inst] = sum(vtimestamp - self->ts);
+ self->name = 0;
+}
+
+sdt:::interrupt-complete
+{
+ self->ts = 0;
+}
+
+dtrace:::END
+{
+ printf("%11s %16s\n", "DEVICE", "TIME (ns)");
+ printa("%10s%-3d %@16d\n", @num);
+}
diff --git a/Cpu/loads.d b/Cpu/loads.d
new file mode 100755
index 000000000000..681e8f6beb7d
--- /dev/null
+++ b/Cpu/loads.d
@@ -0,0 +1,58 @@
+#!/usr/sbin/dtrace -s
+/*
+ * loads.d - print load averages. Written using DTrace (Solaris 10 3/05).
+ *
+ * These are the same load averages that the "uptime" command prints.
+ * The purpose of this script is to demonstrate fetching these values
+ * from the DTrace language.
+ *
+ * $Id: loads.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: loads.d
+ *
+ * SEE ALSO: uptime(1)
+ *
+ * The first field is the 1 minute average, the second is the 5 minute,
+ * and the third is the 15 minute average. The value represents the average
+ * number of runnable threads in the system, a value higher than your
+ * CPU (core/hwthread) count may be a sign of CPU saturation.
+ *
+ * COPYRIGHT: Copyright (c) 2005 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 10-Jun-2005 Brendan Gregg Created this.
+ * 10-Jun-2005 " " Last update.
+ */
+
+#pragma D option quiet
+
+dtrace:::BEGIN
+{
+ /* fetch load averages */
+ this->load1a = `hp_avenrun[0] / 65536;
+ this->load5a = `hp_avenrun[1] / 65536;
+ this->load15a = `hp_avenrun[2] / 65536;
+ this->load1b = ((`hp_avenrun[0] % 65536) * 100) / 65536;
+ this->load5b = ((`hp_avenrun[1] % 65536) * 100) / 65536;
+ this->load15b = ((`hp_avenrun[2] % 65536) * 100) / 65536;
+
+ /* print load average */
+ printf("%Y, load average: %d.%02d, %d.%02d, %d.%02d\n",
+ walltimestamp, this->load1a, this->load1b, this->load5a,
+ this->load5b, this->load15a, this->load15b);
+
+ exit(0);
+}
diff --git a/Cpu/runocc.d b/Cpu/runocc.d
new file mode 100755
index 000000000000..a2b046971a2c
--- /dev/null
+++ b/Cpu/runocc.d
@@ -0,0 +1,56 @@
+#!/usr/sbin/dtrace -s
+/*
+ * runocc.d - run queue occupancy by CPU.
+ * Written using DTrace (Solaris 10 3/05).
+ *
+ * This prints the dispatcher run queue occupancy by CPU each second.
+ * A consistant run queue occupancy is a sign of CPU saturation.
+ *
+ * The value is similar to that seen in "sar -q", however this is
+ * calculated in a more accurate manner - sampling at 1000 Hertz.
+ *
+ * $Id: runocc.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: runocc.d
+ *
+ * FIELDS:
+ * CPU cpu ID
+ * %runocc % run queue occupancy, sampled at 1000 Hertz
+ *
+ * SEE ALSO: Solaris Internals 2nd Ed, vol 2, CPU chapter.
+ *
+ * COPYRIGHT: Copyright (c) 2006 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 02-Mar-2006 Brendan Gregg Created this.
+ * 24-Apr-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+profile-1000hz
+/curthread->t_cpu->cpu_disp->disp_nrunnable/
+{
+ @qocc[cpu] = count();
+}
+
+profile:::tick-1sec
+{
+ normalize(@qocc, 10);
+ printf("\n%8s %8s\n", "CPU", "%runocc");
+ printa("%8d %@8d\n", @qocc);
+ clear(@qocc);
+}
diff --git a/Cpu/xcallsbypid.d b/Cpu/xcallsbypid.d
new file mode 100755
index 000000000000..b08027c2a254
--- /dev/null
+++ b/Cpu/xcallsbypid.d
@@ -0,0 +1,51 @@
+#!/usr/sbin/dtrace -s
+/*
+ * xcallsbypid.d - CPU cross calls by PID.
+ * Writen using DTrace (Solaris 10 3/05).
+ *
+ * $Id: xcallsbypid.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: xcallsbypid.d # hit Ctrl-C to end sample
+ *
+ * FIELDS:
+ * PID process ID
+ * CMD process name
+ * XCALLS number of cross calls
+ *
+ * COPYRIGHT: Copyright (c) 2005, 2006 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 17-Sep-2005 Brendan Gregg Created this.
+ * 20-Apr-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+dtrace:::BEGIN
+{
+ printf("Tracing... Hit Ctrl-C to end.\n");
+}
+
+sysinfo:::xcalls
+{
+ @num[pid, execname] = count();
+}
+
+dtrace:::END
+{
+ printf("%6s %-16s %16s\n", "PID", "CMD", "XCALLS");
+ printa("%6d %-16s %@16d\n", @num);
+}
diff --git a/Disk/Readme b/Disk/Readme
new file mode 100644
index 000000000000..37a5301cb466
--- /dev/null
+++ b/Disk/Readme
@@ -0,0 +1,3 @@
+Disk - Disk based analysis
+
+ These are scripts that analyse I/O activity that has made it to the disks.
diff --git a/Disk/bitesize.d b/Disk/bitesize.d
new file mode 100755
index 000000000000..f2e8ea4fcc3b
--- /dev/null
+++ b/Disk/bitesize.d
@@ -0,0 +1,81 @@
+#!/usr/sbin/dtrace -s
+/*
+ * bitesize.d - analyse disk I/O size by process.
+ * Written using DTrace (Solaris 10 3/05).
+ *
+ * This produces a report for the size of disk events caused by
+ * processes. These are the disk events sent by the block I/O driver.
+ *
+ * If applications must use the disks, we generally prefer they do so
+ * with large I/O sizes.
+ *
+ * $Id: bitesize.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: bitesize.d # wait several seconds, then hit Ctrl-C
+ *
+ * FIELDS:
+ * PID process ID
+ * CMD command and argument list
+ * value size in bytes
+ * count number of I/O operations
+ *
+ * NOTES:
+ *
+ * The application may be requesting smaller sized operations, which
+ * are being rounded up to the nearest sector size or UFS block size.
+ * To analyse what the application is requesting, DTraceToolkit programs
+ * such as Proc/fddist may help.
+ *
+ * SEE ALSO: seeksize.d, iosnoop
+ *
+ * COPYRIGHT: Copyright (c) 2006 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 31-Mar-2004 Brendan Gregg Created this, build 51.
+ * 10-Oct-2004 " " Rewrote to use the io provider, build 63.
+ * 18-Feb-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+/*
+ * Print header
+ */
+dtrace:::BEGIN
+{
+ printf("Tracing... Hit Ctrl-C to end.\n");
+}
+
+/*
+ * Process io start
+ */
+io:::start
+{
+ /* fetch details */
+ this->size = args[0]->b_bcount;
+
+ /* store details */
+ @Size[pid, curpsinfo->pr_psargs] = quantize(this->size);
+}
+
+/*
+ * Print final report
+ */
+dtrace:::END
+{
+ printf("\n%8s %s\n", "PID", "CMD");
+ printa("%8d %S\n%@d\n", @Size);
+}
diff --git a/Disk/diskhits b/Disk/diskhits
new file mode 100755
index 000000000000..3d72e4ade583
--- /dev/null
+++ b/Disk/diskhits
@@ -0,0 +1,113 @@
+#!/usr/bin/ksh
+#
+# diskhits - disk access by file offset.
+# Written using DTrace (Solaris 10 3/05).
+#
+# $Id: diskhits 3 2007-08-01 10:50:08Z brendan $
+#
+# This prints how a file was accessed, the locations on a distribution plot.
+# This is for the cache misses only - the file activity that resulted in
+# disk events.
+#
+# USAGE: diskhits pathname
+# eg,
+# diskhits /var/adm/messages
+#
+# FIELDS:
+# Location (KB) The file offset of the disk activity, Kbytes.
+# Size (KB) Size of the disk activity, Kbytes.
+# Total RW Total disk activity, reads + writes.
+#
+# BASED ON: /usr/demo/dtrace/applicat.d
+#
+# SEE ALSO: DTrace Guide "io Provider" chapter (docs.sun.com)
+# iosnoop (DTraceToolkit)
+#
+# PORTIONS: Copyright (c) 2005, 2006 Brendan Gregg.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at Docs/cddl1.txt
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# CDDL HEADER END
+#
+# 08-Jun-2005 Brendan Gregg Created this.
+# 20-Apr-2006 " " Last update.
+#
+
+### Usage
+function usage
+{
+ cat <<-END >&2
+ USAGE: diskhits pathname
+ eg,
+ diskhits /var/adm/wtmpx
+ END
+ exit 1
+}
+
+### Process arguments
+if (( $# != 1 )); then
+ usage
+fi
+if [[ $1 == "-h" ]]; then
+ usage
+fi
+pathname=$1
+if [[ ! -e $pathname ]]; then
+ print "ERROR2: file $pathname not found" >&2
+ exit 2
+fi
+
+### Calculate output scale
+report_lines=20
+set -- `ls -l $pathname`
+filesize=$5
+(( file_kb_max = filesize / 1024 ))
+(( scale_kb = filesize / (1024 * report_lines) ))
+if (( file_kb_max < 20 )); then file_kb_max=20; fi
+if (( scale_kb < 1 )); then scale_kb=1; fi
+
+#
+# Run DTrace
+#
+/usr/sbin/dtrace -n '
+ #pragma D option quiet
+
+ inline string PATHNAME = "'$pathname'";
+ inline int FILE_KB_MAX = '$file_kb_max';
+ inline int SCALE_KB = '$scale_kb';
+
+ dtrace:::BEGIN
+ {
+ printf("Tracing... Hit Ctrl-C to end.\n");
+ }
+
+ io:::start
+ /args[2]->fi_pathname == PATHNAME/
+ {
+ this->kb = args[2]->fi_offset == -1 ? -1 : args[2]->fi_offset / 1024;
+ @Location = lquantize(this->kb, 0, FILE_KB_MAX, SCALE_KB);
+ @Size = quantize(args[0]->b_bcount/1024);
+ @Total = sum(args[0]->b_bcount/1024);
+ }
+
+ dtrace:::END
+ {
+ printf("Location (KB),");
+ printa(@Location);
+
+ printf("Size (KB),");
+ printa(@Size);
+
+ printa("Total RW: %@d KB\n", @Total);
+ }
+'
diff --git a/Disk/hotspot.d b/Disk/hotspot.d
new file mode 100755
index 000000000000..6ab6ee45d69a
--- /dev/null
+++ b/Disk/hotspot.d
@@ -0,0 +1,71 @@
+#!/usr/sbin/dtrace -s
+/*
+ * hotspot.d - plot disk event by location, look for hotspots.
+ * Written in DTrace (Solaris 10 3/05).
+ *
+ * This simple DTrace script determines if disk activity is occuring in
+ * the one place - a "hotspot". This helps us understand the system's usage
+ * of a disk, it does not imply that the existance or not of a hotspot is
+ * good or bad (often may be good, less seeking).
+ *
+ * $Id: hotspot.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: hotspot.d # hit Ctrl-C to end
+ *
+ * FIELDS:
+ * Disk disk instance name
+ * Major driver major number
+ * Minor driver minor number
+ * value location, by megabyte
+ * count number of I/O operations
+ *
+ * COPYRIGHT: Copyright (c) 2005, 2006 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 07-May-2005 Brendan Gregg Created this.
+ * 20-Apr-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+inline int DISK_MB_MAX = 1000000; /* max size of a single disk */
+inline int REPORT_SCALE_MB = 1000; /* output step size for report */
+
+/*
+ * Print header
+ */
+dtrace:::BEGIN
+{
+ printf("Tracing... Hit Ctrl-C to end.\n");
+}
+
+/*
+ * Process disk event
+ */
+io:::start
+{
+ this->mb = args[0]->b_blkno / 2048;
+ @Block[args[1]->dev_statname, args[1]->dev_major, args[1]->dev_minor] =
+ lquantize(this->mb, 0, DISK_MB_MAX, REPORT_SCALE_MB);
+}
+
+/*
+ * Print final report
+ */
+dtrace:::END
+{
+ printa("Disk: %s Major,Minor: %d,%d\n%@d\n", @Block);
+}
diff --git a/Disk/iofile.d b/Disk/iofile.d
new file mode 100755
index 000000000000..255057a7ebd7
--- /dev/null
+++ b/Disk/iofile.d
@@ -0,0 +1,79 @@
+#!/usr/sbin/dtrace -s
+/*
+ * iofile.d - I/O wait time by filename and process.
+ * Written using DTrace (Solaris 10 3/05).
+ *
+ * This prints the total I/O wait times for each filename by process.
+ * This can help determine why an application is performing poorly by
+ * identifying which file they are waiting on, and the total times.
+ * Both disk and NFS I/O are measured.
+ *
+ * $Id: iofile.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: iofile.d # wait, then hit Ctrl-C to end
+ *
+ * FIELDS:
+ * PID Process ID
+ * CMD Process name
+ * TIME Total wait time for disk events, us
+ * FILE File pathname
+ *
+ * BASED ON: /usr/demo/dtrace/iocpu.d
+ *
+ * SEE ALSO: iosnoop, iotop
+ *
+ * PORTIONS: Copyright (c) 2005, 2006 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 24-Jul-2005 Brendan Gregg Created this.
+ * 20-Apr-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+/* print header */
+dtrace:::BEGIN
+{
+ printf("Tracing... Hit Ctrl-C to end.\n");
+}
+
+/* save time at start */
+io:::wait-start
+{
+ self->start = timestamp;
+}
+
+/* process event */
+io:::wait-done
+/self->start/
+{
+ /*
+ * wait-done is used as we are measing wait times. It also
+ * is triggered when the correct thread is on the CPU, obviating
+ * the need to link process details to the start event.
+ */
+ this->elapsed = timestamp - self->start;
+ @files[pid, execname, args[2]->fi_pathname] = sum(this->elapsed);
+ self->start = 0;
+}
+
+/* print report */
+dtrace:::END
+{
+ normalize(@files, 1000);
+ printf("%6s %-12s %8s %s\n", "PID", "CMD", "TIME", "FILE");
+ printa("%6d %-12.12s %@8d %s\n", @files);
+}
diff --git a/Disk/iofileb.d b/Disk/iofileb.d
new file mode 100755
index 000000000000..e7572f338ad1
--- /dev/null
+++ b/Disk/iofileb.d
@@ -0,0 +1,59 @@
+#!/usr/sbin/dtrace -s
+/*
+ * iofileb.d - I/O bytes by filename and process.
+ * Written using DTrace (Solaris 10 3/05).
+ *
+ * This prints a summary of requested disk activity by pathname,
+ * providing totals of the I/O events in bytes. It is a companion to the
+ * iofile.d script - which prints in terms of I/O wait time, not bytes.
+ * I/O wait time is a better metric for understanding performance issues.
+ * Both disk and NFS I/O are measured.
+ *
+ * $Id: iofileb.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: iofileb.d # wait several seconds, then hit Ctrl-C
+ *
+ * FIELDS:
+ * PID process ID
+ * CMD command name
+ * KB Kilobytes of disk I/O
+ * FILE Full pathname of the file
+ *
+ * COPYRIGHT: Copyright (c) 2006 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 20-Feb-2006 Brendan Gregg Created this.
+ * 20-Feb-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+dtrace:::BEGIN
+{
+ printf("Tracing... Hit Ctrl-C to end.\n");
+}
+
+io:::start
+{
+ @files[pid, execname, args[2]->fi_pathname] = sum(args[0]->b_bcount);
+}
+
+dtrace:::END
+{
+ normalize(@files, 1024);
+ printf("%6s %-12s %6s %s\n", "PID", "CMD", "KB", "FILE");
+ printa("%6d %-12.12s %@6d %s\n", @files);
+}
diff --git a/Disk/iopending b/Disk/iopending
new file mode 100755
index 000000000000..ef9d4da7a625
--- /dev/null
+++ b/Disk/iopending
@@ -0,0 +1,261 @@
+#!/usr/bin/ksh
+#
+# iopending - Print a plot for the number of pending disk I/O events.
+# Written using DTrace (Solaris 10 3/05).
+#
+# This is measuring disk events that have made it past system caches.
+# By plotting a distribution graph of the number of pending events, the
+# "serialness" or "parallelness" of disk behaviour can be distinguished.
+#
+# $Id: iopending 3 2007-08-01 10:50:08Z brendan $
+#
+# USAGE: iopending [-c] [-d device] [-f filename]
+# [-m mount_point] [interval [count]]
+#
+# -c # clear the screen
+# -d device # instance name to snoop (eg, dad0)
+# -f filename # full pathname of file to snoop
+# -m mount_point # this FS only (will skip raw events)
+# eg,
+# iopending # default output, 5 second intervals
+# iopending 1 # 1 second samples
+# iopending -c # clear the screen
+# iopending 5 12 # print 12 x 5 second samples
+#
+# FIELDS:
+# value number of pending events, 0 == idle
+# count number of samples @ 1000 Hz
+# load 1 min load average
+# disk_r total disk read Kbytes for sample
+# disk_w total disk write Kbytes for sample
+#
+# SEE ALSO: iosnoop, iotop
+#
+# IDEA: Dr Rex di Bona (Sydney, Australia)
+#
+# COPYRIGHT: Copyright (c) 2005, 2006 Brendan Gregg.
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at Docs/cddl1.txt
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# CDDL HEADER END
+#
+# Author: Brendan Gregg [Sydney, Australia]
+#
+# 01-Nov-2005 Brendan Gregg Created this.
+# 20-Apr-2006 " " Last update.
+#
+
+
+##############################
+# --- Process Arguments ---
+#
+
+### default variables
+opt_device=0; opt_file=0; opt_mount=0; opt_clear=0;
+opt_def=1; filter=0; device=.; filename=.; mount=.
+interval=5; count=-1
+
+### process options
+while getopts cd:f:hm: name
+do
+ case $name in
+ c) opt_clear=1 ;;
+ d) opt_device=1; device=$OPTARG ;;
+ f) opt_file=1; filename=$OPTARG ;;
+ m) opt_mount=1; mount=$OPTARG ;;
+ h|?) cat <<-END >&2
+ USAGE: iopending [-c] [-d device] [-f filename]
+ [-m mount_point] [interval [count]]
+
+ -c # clear the screen
+ -d device # instance name to snoop
+ -f filename # snoop this file only
+ -m mount_point # this FS only
+ eg,
+ iopending # default output, 5 second samples
+ iopending 1 # 1 second samples
+ iopending -m / # snoop events on filesystem / only
+ iopending 5 12 # print 12 x 5 second samples
+ END
+ exit 1
+ esac
+done
+
+shift $(( $OPTIND - 1 ))
+
+### option logic
+if [[ "$1" > 0 ]]; then
+ interval=$1; shift
+fi
+if [[ "$1" > 0 ]]; then
+ count=$1; shift
+fi
+if (( opt_device || opt_mount || opt_file )); then
+ filter=1
+fi
+if (( opt_clear )); then
+ clearstr=`clear`
+else
+ clearstr=.
+fi
+
+
+
+#################################
+# --- Main Program, DTrace ---
+#
+/usr/sbin/dtrace -n '
+ /*
+ * Command line arguments
+ */
+ inline int OPT_def = '$opt_def';
+ inline int OPT_clear = '$opt_clear';
+ inline int OPT_device = '$opt_device';
+ inline int OPT_mount = '$opt_mount';
+ inline int OPT_file = '$opt_file';
+ inline int INTERVAL = '$interval';
+ inline int COUNTER = '$count';
+ inline int FILTER = '$filter';
+ inline string DEVICE = "'$device'";
+ inline string FILENAME = "'$filename'";
+ inline string MOUNT = "'$mount'";
+ inline string CLEAR = "'$clearstr'";
+
+ inline int MAX_PENDING = 32; /* max pending value */
+
+ #pragma D option quiet
+
+ /*
+ * Print header
+ */
+ dtrace:::BEGIN
+ {
+ /* starting values */
+ counts = COUNTER;
+ secs = INTERVAL;
+ disk_r = 0;
+ disk_w = 0;
+ pending = 0;
+
+ printf("Tracing... Please wait.\n");
+ }
+
+ /*
+ * Check event is being traced
+ */
+ io:genunix::start,
+ io:genunix::done
+ {
+ /* default is to trace unless filtering, */
+ this->ok = FILTER ? 0 : 1;
+
+ /* check each filter, */
+ (OPT_device == 1 && DEVICE == args[1]->dev_statname)? this->ok = 1 : 1;
+ (OPT_file == 1 && FILENAME == args[2]->fi_pathname) ? this->ok = 1 : 1;
+ (OPT_mount == 1 && MOUNT == args[2]->fi_mount) ? this->ok = 1 : 1;
+ }
+
+ /*
+ * Store entry details
+ */
+ io:genunix::start
+ /this->ok/
+ {
+ /* track bytes */
+ disk_r += args[0]->b_flags & B_READ ? args[0]->b_bcount : 0;
+ disk_w += args[0]->b_flags & B_READ ? 0 : args[0]->b_bcount;
+
+ /* increase event pending count */
+ pending++;
+ }
+
+ /*
+ * Process and Print completion
+ */
+ io:genunix::done
+ /this->ok/
+ {
+ /* decrease event pending count */
+ pending--;
+ }
+
+ /*
+ * Prevent pending from underflowing
+ * this can happen if this program is started during disk events.
+ */
+ io:genunix::done
+ /pending < 0/
+ {
+ pending = 0;
+ }
+
+ /*
+ * Timer
+ */
+ profile:::tick-1sec
+ {
+ secs--;
+ }
+
+ profile:::profile-1000hz
+ {
+ @out = lquantize(pending, 0, MAX_PENDING, 1);
+ }
+
+ /*
+ * Print Report
+ */
+ profile:::tick-1sec
+ /secs == 0/
+ {
+ /* fetch 1 min load average */
+ this->load1a = `hp_avenrun[0] / 65536;
+ this->load1b = ((`hp_avenrun[0] % 65536) * 100) / 65536;
+
+ /* convert counters to Kbytes */
+ disk_r /= 1024;
+ disk_w /= 1024;
+
+ /* print status */
+ OPT_clear ? printf("%s", CLEAR) : 1;
+ printf("%Y, load: %d.%02d, disk_r: %6d KB, disk_w: %6d KB",
+ walltimestamp, this->load1a, this->load1b, disk_r, disk_w);
+
+ /* print output */
+ printa(@out);
+
+ /* clear data */
+ trunc(@out);
+ disk_r = 0;
+ disk_w = 0;
+ secs = INTERVAL;
+ counts--;
+ }
+
+ /*
+ * End of program
+ */
+ profile:::tick-1sec
+ /counts == 0/
+ {
+ exit(0);
+ }
+
+ /*
+ * Cleanup for Ctrl-C
+ */
+ dtrace:::END
+ {
+ trunc(@out);
+ }
+'
diff --git a/Disk/seeksize.d b/Disk/seeksize.d
new file mode 100755
index 000000000000..963d9ad6d637
--- /dev/null
+++ b/Disk/seeksize.d
@@ -0,0 +1,85 @@
+#!/usr/sbin/dtrace -s
+/*
+ * seeksize.d - analyse disk head seek distance by process.
+ * Written using DTrace (Solaris 10 3/05).
+ *
+ * Disk I/O events caused by processes will in turn cause the disk heads
+ * to seek. This program analyses those seeks, so that we can determine
+ * if processes are causing the disks to seek in a "random" or "sequential"
+ * manner.
+ *
+ * $Id: seeksize.d 3 2007-08-01 10:50:08Z brendan $
+ *
+ * USAGE: seeksize.d # wait several seconds, then hit Ctrl-C
+ *
+ * FIELDS:
+ * PID process ID
+ * CMD command and argument list
+ * value distance in disk blocks (sectors)
+ * count number of I/O operations
+ *
+ * SEE ALSO: bitesize.d, iosnoop
+ *
+ * COPYRIGHT: Copyright (c) 2006 Brendan Gregg.
+ *
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at Docs/cddl1.txt
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * CDDL HEADER END
+ *
+ * 11-Sep-2004 Brendan Gregg Created this.
+ * 10-Oct-2004 " " Rewrote to use the io provider.
+ * 20-Apr-2006 " " Last update.
+ */
+
+#pragma D option quiet
+
+/*
+ * Print header
+ */
+dtrace:::BEGIN
+{
+ printf("Tracing... Hit Ctrl-C to end.\n");
+}
+
+self int last[dev_t];
+
+/*
+ * Process io start
+ */
+io:genunix::start
+/self->last[args[0]->b_edev] != 0/
+{
+ /* calculate seek distance */
+ this->last = self->last[args[0]->b_edev];
+ this->dist = (int)(args[0]->b_blkno - this->last) > 0 ?
+ args[0]->b_blkno - this->last : this->last - args[0]->b_blkno;
+
+ /* store details */
+ @Size[pid, curpsinfo->pr_psargs] = quantize(this->dist);
+}
+
+io:genunix::start
+{
+ /* save last position of disk head */
+ self->last[args[0]->b_edev] = args[0]->b_blkno +
+ args[0]->b_bcount / 512;
+}
+
+/*
+ * Print final report
+ */
+dtrace:::END
+{
+ printf("\n%8s %s\n", "PID", "CMD");
+ printa("%8d %S\n%@d\n", @Size);
+}
diff --git a/Docs/Contents b/Docs/Contents
new file mode 100644
index 000000000000..525fd05b85a7
--- /dev/null
+++ b/Docs/Contents
@@ -0,0 +1,152 @@
+Contents - Command Summary
+
+ The following is a list of commands found in the DTraceToolkit, along
+ with their directory location.
+
+Generally commands that end in a ".d" are DTrace scripts, and commands
+that don't are DTrace scripts wrapped in another language (eg, shell
+or Perl). See the Docs/Readme for instructions for finding their docs.
+
+DTraceToolkit/
+ dexplorer run a series of scripts and archive output
+ dtruss process syscall info. DTrace truss
+ dvmstat vmstat by PID/name/command
+ errinfo report syscall failures with details
+ execsnoop snoop process execution as it occurs
+ iosnoop snoop I/O events as they occur
+ iopattern print disk I/O pattern
+ iotop display top disk I/O events by process
+ opensnoop snoop file opens as they occur
+ procsystime analyse process system call times
+ rwsnoop snoop read/write events
+ rwtop display top read/write bytes by process
+ statsnoop snoop file stats as they occur
+ Apps/
+ httpdstat.d realtime httpd statistics
+ nfswizard.d NFS client activity wizard
+ shellsnoop snoop live shell activity
+ weblatency.d website latency statistics
+ Cpu/
+ cputypes.d list CPU types
+ cpuwalk.d measure which CPUs a process runs on
+ dispqlen.d dispatcher queue length by CPU
+ intbycpu.d interrupts by CPU
+ intoncpu.d interrput on-cpu usage
+ inttimes.d interrput on-cpu time total
+ loads.d print load averages
+ runocc.d run queue occupancy by CPU
+ xcallsbypid.d CPU cross calls by PID
+ Disk/
+ bitesize.d print disk event size report
+ diskhits disk access by file offset
+ hotspot.d print disk event by location
+ iofile.d I/O wait time by filename and process
+ iofileb.d I/O bytes by filename and process
+ iopending plot number of pending disk events
+ pathopens.d pathnames successfully opened count
+ seeksize.d print disk seek size report
+ Docs/
+ oneliners.txt DTrace oneliners
+ FS/
+ fsrw.d file system read/write event tracing
+ fspaging.d file system read/write and paging tracing
+ rfsio.d read FS I/O stats, with cache miss rate
+ rfileio.d read file I/O stats, with cache miss rate
+ vopstat vnode interface statistics
+ Java/
+ j_*.d 18 scripts for tracing Java using the hotspot provider
+ JavaScript/
+ js_*.d 14 scripts for JavaScript with the Mozilla provider
+ Kernel/
+ cputimes print time by Kernel/Idle/Process
+ cpudists time distribution by Kernel/Idle/Process
+ cswstat.d context switch time statistics
+ dnlcps.d DNLC stats by process
+ dnlcsnoop.d snoop DNLC activity
+ dnlcstat DNLC statistics
+ kstat_types.d trace kstat reads with type info
+ modcalls.d kernel function calls by module name
+ priclass.d priority distribution by scheduling class
+ pridist.d process priority distribution
+ putnexts.d trace who is putting to which streams module
+ whatexec.d examine the type of files executed
+ Locks/
+ lockbyproc.d lock time by process name
+ lockbydist.d lock time distribution by process name
+ Mem/
+ anonpgpid.d anonymous memory paging info by PID on CPU
+ minfbypid.d minor faults by PID
+ minfbyproc.d minor faults by process name
+ pgpginbypid.d pages paged in by PID
+ pgpginbyproc.d pages paged in by process name
+ swapinfo.d print virtual memory info
+ vmbypid.d virtual memory stats by PID
+ vmstat.d vmstat demo using DTrace
+ vmstat-p.d vmstat -p demo using DTrace
+ xvmstat extended vmstat demo using DTrace
+ Misc/
+ guess.d guessing game
+ wpm.d words per minute tracing
+ woof.d audio alert for new processes
+ Net/
+ connections print inbound TCP connections by process
+ icmpstat.d print ICMP statistics
+ tcpsnoop snoop TCP network packets by process, Solaris 10 3/05
+ tcpsnoop_snv snoop TCP network packets by process, Solaris Nevada
+ tcpsnoop.d snoop TCP network packets by process, Solaris 10 3/05
+ tcpsnoop_snv.d snoop TCP network packets by process, Solaris Nevada
+ tcpstat.d print TCP statistics
+ tcptop display top TCP network packets by PID, Solaris 10 3/05
+ tcptop_snv display top TCP network packets by PID, Solaris Nevada
+ tcpwdist.d simple TCP write distribution by process
+ udpstat.d print UDP statistics
+ Perl/
+ pl_*.d 12 scripts for tracing Perl
+ Php/
+ php_*.d 12 scripts for tracing Php
+ Proc/
+ crash.d crashed application report
+ creatbyproc.d snoop file creat() by process name
+ dappprof profile user and lib function usage
+ dapptrace trace user and lib function usage
+ fddist file descriptor usage distribution
+ fileproc.d snoop files opened by process
+ kill.d snoop process signals
+ lastwords print syscalls before exit
+ mmapfiles.d mmap'd files by process
+ newproc.d snoop new processes
+ pfilestat show I/O latency break down by FD
+ pidpersec.d print new PIDs per sec
+ readbytes.d read bytes by process name
+ readdist.d read distribution by process name
+ rwbbypid.d read/write bytes by PID
+ rwbypid.d read/write calls by PID
+ rwbytype.d read/write bytes by vnode type
+ sampleproc sample processes on the CPUs
+ shortlived.d check short lived process time
+ sigdist.d signal distribution by process name
+ stacksize.d measure stack size for running threads
+ sysbypid.d system stats by PID
+ syscallbyproc.d system calls by process name
+ syscallbypid.d system calls by process ID
+ threaded.d sample multi-threaded CPU usage
+ topsysproc display top syscalls by process name
+ writebytes.d write bytes by process name
+ writedist.d write distribution by process name
+ Python/
+ py_*.d 14 scripts for tracing Python
+ Shell/
+ sh_*.d 15 scripts for tracing the Bourne shell
+ System/
+ sar-c.d sar -c demo using DTrace
+ syscallbysysc.d system calls by system call
+ topsyscall display top system call type
+ uname-a.d uname -a demo using DTrace
+ Tcl/
+ tcl_*.d 15 scripts for tracing Tcl
+ User/
+ setuids.d snoop setuid calls
+ Zones/
+ zvmstat vmstat info by zone
+
+Total: 230 scripts
diff --git a/Docs/Examples b/Docs/Examples
new file mode 120000
index 000000000000..309832683601
--- /dev/null
+++ b/Docs/Examples
@@ -0,0 +1 @@
+../Examples \ No newline at end of file
diff --git a/Docs/Faq b/Docs/Faq
new file mode 100644
index 000000000000..4919cac9fc51
--- /dev/null
+++ b/Docs/Faq
@@ -0,0 +1,126 @@
+Faq - Frequently Asked Questions
+
+ The following may serve as a guide to the DTraceToolkit.
+
+16-May-2005, ver 0.30 (first version of the FAQ)
+
+The DTraceToolkit is new, and as such there hasn't been many questions asked.
+This may be better called a "possibly asked questions" :)
+
+
+Questions
+
+1. Intro
+1.1. What is the DTraceToolkit?
+1.2. Who wrote the DTraceToolkit?
+1.3. Where do I get support?
+1.4. Am I now a performance tuning expert?
+1.5. Will this solve all my performance problems?
+1.6. So the DTraceToolkit *is* DTrace?
+
+2. Toolkit
+2.1. What is in it?
+2.2. What performance effect can the DTraceToolkit cause?
+
+3. Contributing
+3.1. Where do I send bugs?
+
+
+Answers
+
+1. Intro
+
+1.1. What is the DTraceToolkit?
+
+ The DTraceToolkit is a collection of tools written using DTrace for
+ the Solaris 10[tm] OS by Sun Microsystems[tm]. Many of these scripts
+ will also work on OpenSolaris.
+
+1.2. Who wrote the DTraceToolkit?
+
+ Volunteers of the DTrace and OpenSolaris community. Check the scripts
+ themselves, Docs/Contrib, Docs/Who and Docs/History.
+
+1.3. Where do I get support?
+
+ As the DTraceToolkit is a freeware product, there is no official company
+ offering support for this. Sun Microsystems does not support this. If you
+ post messages to the DTrace forums found in the Docs/Links file, a
+ volunteer may help you out.
+
+1.4. Am I now a performance tuning expert?
+
+ The DTraceToolkit does not turn people into performance tuning experts in
+ the same way that owning a set of golf clubs won't make you a professional
+ golfer. Experience and understanding are necessary. The toolkit certainly
+ helps by fetching the data in an easy way, and also by providing some
+ documentation. So it is valuable, but not magical.
+
+1.5. Will this solve all my performance problems?
+
+ This is similar to the previous point; the DTraceToolkit is valuable
+ for it's scripts and documentation, but it's no magical product.
+ Understanding and experience are necessary.
+
+1.6. So the DTraceToolkit *is* DTrace?
+
+ The DTraceToolkit is one use of DTrace, but there is far more to DTrace
+ than just the toolkit. DTrace allows people to write their own customised
+ scripts to solve a wide number of problems.
+
+ Think of the DTraceToolkit as a starting point. Maybe your problem has
+ a solution in the kit. Maybe changing one of the toolkit programs slightly
+ is what you want. Finally you may need to write your script from scratch.
+
+
+2. Toolkit
+
+2.1. What is in it?
+
+ Read the Guide file for a table of contents, and Docs/Contents for a
+ list of commands.
+
+2.2. What performance effect can the DTraceToolkit cause?
+
+ Enabling DTrace to monitor events has little effect on the system,
+ especially when compared to the disruptive behaviour of truss (See
+ http://www.brendangregg.com/DTrace/dtracevstruss.html for a comparison).
+
+ It really boils down to how often the events occur that you are monitoring.
+ The following numbers have been provided as an approximation:
+
+ 1. Fixed rate scripts. For example, dispqlen.d samples at 1000 hz.
+ The impact will be negligible, close to 0% CPU. (in testing, 0.1% CPU).
+
+ 2. Demand rated scripts. For example, iosnoop probes disk I/O events.
+ The impact depends on the rate of events, for many servers the disk
+ events would be slow enough for this to be less than 0.2% CPU.
+ Scripts such as execsnoop would expect even fewer events, their impact
+ would be close to 0.0% CPU. However scripts that monitor potentially
+ very rapid events will have a greater impact, for example running
+ dapptrace on Xorg (over 6000 lines of output per second) was consuming
+ around 10% of a CPU to do so.
+
+ 3. Heavy voodoo scripts. A few scripts in the toolkit must probe either
+ a ton of different events, or very rapid events, or both. They are
+ going to hurt and there is no way around it. Scripts such as cputimes
+ and cpudists trace very frequent events, and can chew around 5% of
+ the CPUs; scripts such as dapptrace and dappprof trace extreamly
+ frequent events, and can chew over 20%.
+
+ There is an emphasis in the DTraceToolkit to write demand rated scripts
+ that measure the fewest events, such that their impact is close to 0.0%
+ CPU usage. Some scripts are fixed rate, which are safer as their impact
+ has a known upper bound, and are most suitable to run in production.
+
+ There are additional notes in Notes/ALLoverhead_notes.txt about the
+ overheads for running DTrace.
+
+
+3. Contributing
+
+3.1. Where do I send bugs?
+
+ The DTraceToolkit maintainer. See the Docs/Maintainer file.
+
+
diff --git a/Docs/History b/Docs/History
new file mode 100644
index 000000000000..d92bf11436e4
--- /dev/null
+++ b/Docs/History
@@ -0,0 +1,249 @@
+History - History of the DTraceToolkit
+
+------------------------------------------------------------------------------
+20-Apr-2005 Brendan Gregg Idea
+ For a while I had thought that a DTrace toolkit would be a nice
+ idea, but on this day it became clear. I was explaining DTrace to
+ an SSE from Sun (Canberra, Australia), who had a need for using
+ DTrace but didn't have the time to sit down and write all the
+ tools he was after. It simply made sense to have a DTrace toolkit
+ that people could download or carry around a copy to use. Some
+ people would write DTrace tools, others would use the toolkit.
+------------------------------------------------------------------------------
+15-May-2005 Brendan Gregg Version 0.30
+ I had discussed the idea of a DTrace toolkit with the Sun PAE guys in
+ Adelaide, Australia. It was making more sense now. It would be much
+ like the SE Toolkit, not just due to the large number of sample
+ scripts provided, but also due to the role it would play: few people
+ wrote SE Toolkit programs, more people used it as a toolkit. While
+ we would like a majority of Solaris users to write DTrace scripts,
+ the reality is that many would want to use a prewritten toolkit.
+ Today I created the toolkit as version 0.30, with 11 main directories,
+ a dozen scripts, man pages and a structure for documentation.
+------------------------------------------------------------------------------
+16-May-2005 Brendan Gregg OneLiners
+ I've been using the toolkit for a day now (wow!), and have noticed
+ a few problems I've been fixing. One of them was the dtrace oneliners.
+ I have them in two files, Docs/oneliners.txt and the examples in
+ Docs/Examples/oneliners_examples.txt. The problem is that when I'm
+ looking for a script, I'm looking in Docs/Commands - a list of the
+ seperate script files, or I'm doing an ls or find. Ok, so I've now
+ made each one liner a seperate script. This seems at first pretty
+ silly since they are oneliners and shouldn't deserve an entire script
+ each, but I've found having them as seperate scripts makes them far
+ easier to find and use. The scripts and man page for each script do
+ point out the fact that it's a one liner.
+------------------------------------------------------------------------------
+17-May-2005 Brendan Gregg Version 0.33
+ Version 0.33 with 33 scripts. Maybe I should make the version number
+ equal the script count. :) I just finished dtruss, dapptrace and
+ dappprof.
+------------------------------------------------------------------------------
+08-Jun-2005 Brendan Gregg Name changes.
+ I've renamed Docs/Commands to Docs/Contents. I found myself typing
+ "more Docs/Contents" by mistake a lot. ok, maybe it made more sense
+ to call it Contents after all. I've also made a symlink to it called
+ Index.
+------------------------------------------------------------------------------
+08-Jun-2005 Brendan Gregg Version 0.35
+ Version 0.35 with 35 scripts. Also touched up procsystime and some
+ man pages. Added the CDDL version 1.0.
+------------------------------------------------------------------------------
+09-Jun-2005 Brendan Gregg Version 0.42
+ Added 7 more scripts.
+------------------------------------------------------------------------------
+14-Jun-2005 Brendan Gregg Version 0.57
+ Added heaps of new scripts. Now at 57 scripts.
+------------------------------------------------------------------------------
+17-Jun-2005 Brendan Gregg Version 0.61
+ Restyled many commands.
+------------------------------------------------------------------------------
+28-Jun-2005 Brendan Gregg Version 0.70
+ Added several commands including dexplorer. Developed a few useful
+ variants of classic scripts while writing dexplorer, and have added
+ them to the toolkit (I kept wanting to run them individually but
+ not have to run an entire dexplorer).
+------------------------------------------------------------------------------
+25-Jul-2005 Brendan Gregg Version 0.77
+ Added tcpsnoop.d, tcpsnoop, tcptop. Because of their addition I have
+ dropped tcpwbytes.d and tcpwlist. These are complex scripts, but they
+ track TCP in an accurate manner. However! also because they are
+ complex scripts, I expect they will require maintainence for newer
+ versions of [Open]Solaris, as various probes may change. They will
+ become much more stable once a network provider has been added to
+ DTrace (which may be some time away).
+ Also added iotop, and updated a bunch of scripts. A lot of work went
+ into this version, although the version change doesn't reflect that
+ (I'm still keeping the version number == to number of scripts).
+ Also added rwsnoop, rwtop, and more.
+------------------------------------------------------------------------------
+26-Jul-2005 Brendan Gregg Version 0.82
+ Many new scripts added, many updates. This is a major release.
+------------------------------------------------------------------------------
+17-Sep-2005 Brendan Gregg Version 0.83
+ A few scripts have been updated so that they work better.
+ execsnoop, iosnoop, opensnoop and rwsnoop will be more responsive
+ (increased switchrate).
+------------------------------------------------------------------------------
+22-Sep-2005 Brendan Gregg Version 0.84
+ Some updates, fixed some bugs (cputimes, cpudists). Added cpuwalk.d.
+------------------------------------------------------------------------------
+15-Nov-2005 Brendan Gregg Sys Admin Magazine
+ Ryan Matteson wrote an article on the DTraceToolkit which has been
+ printed in Sys Admin Magazine, December 2005. It's quite good,
+ and made it as the feature article - which means it will be available
+ online for some time. Thanks Matty, and Sys Admin Magazine!
+ "Observing I/O Behavior with the DTraceToolkit"
+ http://www.samag.com/documents/sam0512a/
+------------------------------------------------------------------------------
+01-Dec-2005 Brendan Gregg Version 0.88
+ Many scripts were updated. Added the Apps category. I had planned
+ to add some key scripts, but they haven't made it out of testing yet.
+------------------------------------------------------------------------------
+03-Dec-2005 Brendan Gregg Version 0.89
+ Added nfswisard.d, fixed a minor bug with tcp* tools (see
+ dtrace-discuss mailing list).
+------------------------------------------------------------------------------
+12-Jan-2006 Brendan Gregg Version 0.92
+ Added a few scripts including rwbytype.d. Fixed several issues.
+------------------------------------------------------------------------------
+09-Apr-2006 Brendan Gregg Solaris Internals 2nd Edition
+ In the past few months I have been contributing to Solaris Internals
+ 2nd Edition. This book (now two volumes) is really amazing. The 2nd
+ volume does use the DTraceToolkit where appropriate, and covers loads
+ of useful topics. While writing and reviewing material for Solaris
+ Internals, I've had numerous new ideas for DTrace scripts. Not only
+ that, but a few people have managed to send me well styled, carefully
+ tested, well considered DTrace scripts for inclusion in the toolkit.
+------------------------------------------------------------------------------
+20-Apr-2006 Brendan Gregg TCP bug fixed
+ Stefan Parvu sent me a bug for the tcp* scripts: on build 31+ they
+ error'd on the symbol SS_TCP_FAST_ACCEPT. This symbol was
+ renamed to SS_DIRECT (I checked the code, they are used in the
+ same way). Ironically, when I first wrote the scripts I had hardcoded
+ the value 0x00200000, then rewrote it "properly" by importing
+ the header files and using the symbol name. Had I been lazy and left
+ it hardcoded, the bug would never have eventuated. Not to worry,
+ it has returned to being hardcoded, so that it works on all builds
+ (until something else changes).
+------------------------------------------------------------------------------
+21-Apr-2006 Brendan Gregg Restyled - again!
+ I've been writing the "DTraceToolkit Style Guide", to document
+ the style that these scripts obey. It is quite strict, and sets
+ the bar fairly high. I've been warned that it may cause very few
+ people to ever contribute scripts, which is fine. At some point
+ I'll carefully explain the mentality behind this, but in a nutshell:
+ Users on critical production servers expect the tools to be
+ accurate, carefully tested, and cause no undocumented harm.
+------------------------------------------------------------------------------
+22-Apr-2006 Brendan Gregg Docs changes
+ The "Contrib" file was merged into the "Who" file. In hindsight
+ it is better to keep this data together than to split it up.
+------------------------------------------------------------------------------
+24-Apr-2006 Brendan Gregg Version 0.96
+ The toolkit now contains 104 scripts, however I'll keep the version
+ number < 1.00 until the dust has settled on these new scripts.
+ There is some special significance with version 1.00, it would
+ imply that every script had been tested for some time - not that
+ I've just added a few.
+ There is a new main directory, FS for file system related scripts.
+ There are some interesting scripts in there, from or based on
+ Solaris Internals 2nd ed, vol 2.
+------------------------------------------------------------------------------
+30-Sep-2007 Brendan Gregg Version 0.99
+ It's been a year and a half since the last release, and a lot has
+ happneed. Firstly, the DTraceToolkit has featured in the Prentice Hall
+ book,
+ Solaris Performance and Tools
+ DTrace and mdb techniques for Solaris 10 and OpenSolaris
+
+ written by Richard McDougall, Jim Mauro and myself. It is a companion
+ book to "Solaris Internals 2nd edition" by Richard McDougall and
+ Jim Mauro. If you are serious about becomming a DTrace guru,
+ especially on Solaris, then please study both books. (Yes, I realize
+ that many people are using the DTraceToolkit because they don't have
+ the time or don't want to become DTrace gurus; well, so long as
+ you are using DTrace anyway :). The performance book was a great relief
+ to write - since we were able to put to print much performance wisdom
+ and knowledge that was begging to be documented.
+
+ Then, in late 2006 I joined an advanced products engineering team
+ at Sun in San Francisco, a team which includes the three members of
+ team DTrace. It's been a great opportunity to learn from such
+ engineers, and to contribute more directly to DTrace. So far my work
+ has included writing a JavaScript provider, integrated inet_ntoa()
+ style functions into DTrace, and prototying DTrace IP, TCP and UDP
+ providers.
+
+ Working on the network providers is good news for the DTraceToolkit,
+ as it will indirectly help the tcp* scripts become more stable. Yes,
+ those scripts have broken a few more times during the last 18 months,
+ sorry about that, and it will keep happening until we have stable
+ network providers. This is why I only ever wrote three tcp* scripts,
+ and not at least a dozen, which I'd really like to do.
+
+ I did leave my pile of old SPARC and x86 development servers behind
+ in Australia, and brought over a couple of laptops. That has made me
+ more dependant on Stefan for testing the toolkit - especially on SPARC.
+
+ So, it's been about 18 months since the last release, which is
+ mostly due to having less spare time due to moving countries and
+ learning a new job.
+
+ Michelle from Sun docs has been asking for a newer version of the
+ DTraceToolkit for the OpenSolaris starter kit, which is why I'm
+ releasing this version now and not waiting a few more weeks as
+ I complete bug fixes.
+
+ So the good and the bad news for this release, starting with the bad,
+
+ Bad: tcpsnoop/tcptop still don't work on some Solaris 10 releases.
+ I've added versions that should work on Solaris Nevada and OpenSolaris
+ for releases from around late 2007. They are likely to break again.
+ The real answer, as always, is for stable nework providers to be
+ integrated into Solaris.
+
+ Many of the exciting new language provider scripts in this release
+ currently require downloading, patching and compling of the language
+ interpreter to get working. See the Readme file in each directory
+ for pointers.
+
+ Good: many more scripts to cover the new DTrace language providers
+ that are available (the DTraceToolkit is now 227 scripts). Many
+ updates to the Notes directory. Bug fixes. Some new categories
+ other than for scripts: Code - for simple programs to DTrace (and
+ for the example files), and Snippits - for useful lumps of DTrace
+ code to copy-n-paste from. The man pages are also making room
+ for documenting both stability and supported operating systems for
+ each script - now that DTrace exists for MacOS X Leopard, the
+ DTraceToolkit will begin supporting multiple operating systems.
+
+ This can be thought of as a developer's release of the DTraceToolkit -
+ to help people start using DTrace with Perl, Python, Ruby, Php, Java,
+ JavaScript, Shell and Tcl. I've written about 15 scripts for each
+ language, to cover the basics and to show the way for deeper analysis.
+ The scripts are also similar from one language to another, having
+ devoleped a tried-and-tested group of scripts for analyzing real world
+ issues - it made sense to repeat these scripts for every language
+ possible. To see what I mean, try reading,
+
+ Examples/j_cputime_example.txt Examples/py_cputime_example.txt
+ Examples/js_cputime_example.txt Examples/rb_cputime_example.txt
+ Examples/php_cputime_example.txt Examples/sh_cputime_example.txt
+ Examples/pl_cputime_example.txt Examples/tcl_cputime_example.txt
+
+ You might notice that the example files are more clearly and carefully
+ explained. Claire (my wife), wrote close to one hundred of them for
+ this release while I focused on writing and testing the scripts.
+ Claire has worked as a SysAdmin and as an IT instructor, and is well
+ skilled at explaining relavent technical details. And she can spell
+ much better than I can. :)
+
+ The future: I still have many new scripts and some bug fixes in mind,
+ as well as generally improving the Notes and Examples provided.
+ Hopefully it won't be too many months before you see another
+ release. Check here for the lastest installment,
+
+ http://www.opensolaris.org/os/community/dtrace/dtracetoolkit
+------------------------------------------------------------------------------
+
diff --git a/Docs/Index b/Docs/Index
new file mode 120000
index 000000000000..9ae9ea0ab582
--- /dev/null
+++ b/Docs/Index
@@ -0,0 +1 @@
+Contents \ No newline at end of file
diff --git a/Docs/Links b/Docs/Links
new file mode 100644
index 000000000000..182bb548b5b2
--- /dev/null
+++ b/Docs/Links
@@ -0,0 +1,30 @@
+Links - DTrace links
+
+ http://www.opensolaris.org/os/community/dtrace/dtracetoolkit
+ DTraceToolkit Home
+
+ http://www.opensolaris.org/os/community/dtrace
+ OpenSolaris DTrace site
+
+ http://www.brendangregg.com/dtrace.html
+ DTraceToolkit
+ DTrace Tools
+
+ http://www.sun.com/bigadmin/content/dtrace
+ DTrace site on BigAdmin
+
+ http://docs.sun.com/db/doc/817-6223
+ DTrace Guide (answerbook)
+
+ http://blogs.sun.com/roller/page/bmc
+ Bryan Cantrill's Blog (DTrace Team)
+
+ http://blogs.sun.com/roller/page/ahl
+ Adam Leventhal's Blog (DTrace Team)
+
+ http://blogs.sun.com/mws
+ Mike Shapiro's Blog (DTrace Team)
+
+ http://www.solarisinternals.com/si/dtrace/index.php
+ DTrace scripts by Richard McDougall
+
diff --git a/Docs/Maintainer b/Docs/Maintainer
new file mode 100644
index 000000000000..3a8bb429a1c4
--- /dev/null
+++ b/Docs/Maintainer
@@ -0,0 +1,6 @@
+Maintainer - The DTraceToolkit Author and Maintainer,
+
+ Brendan Gregg
+ brendan@sun.com (or see website below for emailaddr)
+ http://www.brendangregg.com
+
diff --git a/Docs/Notes b/Docs/Notes
new file mode 120000
index 000000000000..e0856feb2688
--- /dev/null
+++ b/Docs/Notes
@@ -0,0 +1 @@
+../Notes \ No newline at end of file
diff --git a/Docs/Readme b/Docs/Readme
new file mode 100644
index 000000000000..1f98f38d30f1
--- /dev/null
+++ b/Docs/Readme
@@ -0,0 +1,21 @@
+Docs - DTraceToolkit Documentation
+
+ Docs/Contents summary of toolkit commands
+ Examples examples of command usage
+ Notes notes on commands
+
+The following may be followed to learn about a DTraceToolkit command,
+
+ 1. read "Contents" for a command name and toolkit location.
+ 2. run the command with "-h" to check it's usage.
+ 3. read the manpage from Man/man1m.
+ 4. read the examples from Examples.
+ 5. read the notes from Notes.
+ 6. read the script itself
+
+Try the following to discover all docs related to a command, eg iosnoop,
+
+ find . | grep iosnoop
+
+best run from the DTraceToolkit root directory.
+
diff --git a/Docs/ToDo b/Docs/ToDo
new file mode 100644
index 000000000000..5561ea4b17ad
--- /dev/null
+++ b/Docs/ToDo
@@ -0,0 +1,7 @@
+ToDo - To Do List
+
+ The following is a list of todo reminders for the DTraceToolkit.
+
+* Run PHP examples on mediawiki.
+
+
diff --git a/Docs/Who b/Docs/Who
new file mode 100644
index 000000000000..f1019a9b92b1
--- /dev/null
+++ b/Docs/Who
@@ -0,0 +1,74 @@
+Who - Who the Contributers are
+
+ This is a record of contributors to the DTraceToolkit whose name isn't
+ already mentioned (such as in the source of a script).
+
+
+In alphabetical first-name order,
+
+Adam Leventhal
+ Location: CA, USA
+ Blog: http://blogs.sun.com/ahl
+ wrote DTrace itself
+
+Ben Rockwood
+ Location: CA, USA
+ Website: http://www.cuddletech.com
+ first encouraged the idea of DTrace oneliners
+
+Brendan Gregg
+ Location: Sydney, Australia
+ Website: http://www.brendangregg.com
+ Email: brendan.gregg@tpg.com.au (maybe, check the website above)
+ Blog: http://bdgregg.blogspot.com
+ Notes: Also see http://www.brendangregg.com/dtrace.html
+ created toolkit, tools, manpages, example docs, notes docs, testing
+
+Bryan Cantrill
+ Location: CA, USA
+ Blog: http://blogs.sun.com/bmc
+ wrote DTrace itself
+
+David Rubio
+ technical advice
+
+James Dickens
+ Location: WI, USA
+ Blog: http://uadmin.blogspot.com
+ tool ideas and testing
+
+Jonathan Adams
+ Blog: http://blogs.sun.com/jwadams
+ wrote stacksize.d
+
+Mike Shapiro
+ Location: CA, USA
+ Blog: http://blogs.sun.com/mws
+ wrote DTrace itself
+
+Nathan Kroenert
+ Location: Sydney, Australia
+ thoughts on how to present tools
+
+Richard McDougall
+ Location: CA, USA
+ Website: http://www.solarisinternals.com
+ Blog: http://blogs.sun.com/rmc
+ wrote pfilestat, vopstat
+
+Ryan Matteson
+ Location: USA
+ Blog: http://blogomatty.blogspot.com
+ tool ideas and testing
+
+Stefan Parvu
+ Blog: http://stefanparvu.blogspot.com
+ suggestions, bug fixes, extensive testing
+
+unknown Sun people
+ wrote /usr/demo/dtrace tools, which some of the toolkit tools are
+ based on. See "BASED ON" in source or man page, or try the following,
+ cd Bin
+ grep 'BASED ON' *
+ for a list.
+
diff --git a/Docs/cddl1.txt b/Docs/cddl1.txt
new file mode 100644
index 000000000000..b3487ade1b87
--- /dev/null
+++ b/Docs/cddl1.txt
@@ -0,0 +1,385 @@
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+
+ 1. Definitions.
+
+ 1.1. “Contributor” means each individual or entity that
+ creates or contributes to the creation of Modifications.
+
+ 1.2. “Contributor Version” means the combination of the
+ Original Software, prior Modifications used by a
+ Contributor (if any), and the Modifications made by that
+ particular Contributor.
+
+ 1.3. “Covered Software” means (a) the Original Software, or
+ (b) Modifications, or (c) the combination of files
+ containing Original Software with files containing
+ Modifications, in each case including portions thereof.
+
+ 1.4. “Executable” means the Covered Software in any form
+ other than Source Code.
+
+ 1.5. “Initial Developer” means the individual or entity
+ that first makes Original Software available under this
+ License.
+
+ 1.6. “Larger Work” means a work which combines Covered
+ Software or portions thereof with code not governed by the
+ terms of this License.
+
+ 1.7. “License” means this document.
+
+ 1.8. “Licensable” means having the right to grant, to the
+ maximum extent possible, whether at the time of the initial
+ grant or subsequently acquired, any and all of the rights
+ conveyed herein.
+
+ 1.9. “Modifications” means the Source Code and Executable
+ form of any of the following:
+
+ A. Any file that results from an addition to,
+ deletion from or modification of the contents of a
+ file containing Original Software or previous
+ Modifications;
+
+ B. Any new file that contains any part of the
+ Original Software or previous Modification; or
+
+ C. Any new file that is contributed or otherwise made
+ available under the terms of this License.
+
+ 1.10. “Original Software” means the Source Code and
+ Executable form of computer software code that is
+ originally released under this License.
+
+ 1.11. “Patent Claims” means any patent claim(s), now owned
+ or hereafter acquired, including without limitation,
+ method, process, and apparatus claims, in any patent
+ Licensable by grantor.
+
+ 1.12. “Source Code” means (a) the common form of computer
+ software code in which modifications are made and (b)
+ associated documentation included in or with such code.
+
+ 1.13. “You” (or “Your”) means an individual or a legal
+ entity exercising rights under, and complying with all of
+ the terms of, this License. For legal entities, “You”
+ includes any entity which controls, is controlled by, or is
+ under common control with You. For purposes of this
+ definition, “control” means (a) the power, direct or
+ indirect, to cause the direction or management of such
+ entity, whether by contract or otherwise, or (b) ownership
+ of more than fifty percent (50%) of the outstanding shares
+ or beneficial ownership of such entity.
+
+ 2. License Grants.
+
+ 2.1. The Initial Developer Grant.
+
+ Conditioned upon Your compliance with Section 3.1 below and
+ subject to third party intellectual property claims, the
+ Initial Developer hereby grants You a world-wide,
+ royalty-free, non-exclusive license:
+
+ (a) under intellectual property rights (other than
+ patent or trademark) Licensable by Initial Developer,
+ to use, reproduce, modify, display, perform,
+ sublicense and distribute the Original Software (or
+ portions thereof), with or without Modifications,
+ and/or as part of a Larger Work; and
+
+ (b) under Patent Claims infringed by the making,
+ using or selling of Original Software, to make, have
+ made, use, practice, sell, and offer for sale, and/or
+ otherwise dispose of the Original Software (or
+ portions thereof).
+
+ (c) The licenses granted in Sections 2.1(a) and (b)
+ are effective on the date Initial Developer first
+ distributes or otherwise makes the Original Software
+ available to a third party under the terms of this
+ License.
+
+ (d) Notwithstanding Section 2.1(b) above, no patent
+ license is granted: (1) for code that You delete from
+ the Original Software, or (2) for infringements
+ caused by: (i) the modification of the Original
+ Software, or (ii) the combination of the Original
+ Software with other software or devices.
+
+ 2.2. Contributor Grant.
+
+ Conditioned upon Your compliance with Section 3.1 below and
+ subject to third party intellectual property claims, each
+ Contributor hereby grants You a world-wide, royalty-free,
+ non-exclusive license:
+
+ (a) under intellectual property rights (other than
+ patent or trademark) Licensable by Contributor to
+ use, reproduce, modify, display, perform, sublicense
+ and distribute the Modifications created by such
+ Contributor (or portions thereof), either on an
+ unmodified basis, with other Modifications, as
+ Covered Software and/or as part of a Larger Work; and
+
+
+ (b) under Patent Claims infringed by the making,
+ using, or selling of Modifications made by that
+ Contributor either alone and/or in combination with
+ its Contributor Version (or portions of such
+ combination), to make, use, sell, offer for sale,
+ have made, and/or otherwise dispose of: (1)
+ Modifications made by that Contributor (or portions
+ thereof); and (2) the combination of Modifications
+ made by that Contributor with its Contributor Version
+ (or portions of such combination).
+
+ (c) The licenses granted in Sections 2.2(a) and
+ 2.2(b) are effective on the date Contributor first
+ distributes or otherwise makes the Modifications
+ available to a third party.
+
+ (d) Notwithstanding Section 2.2(b) above, no patent
+ license is granted: (1) for any code that Contributor
+ has deleted from the Contributor Version; (2) for
+ infringements caused by: (i) third party
+ modifications of Contributor Version, or (ii) the
+ combination of Modifications made by that Contributor
+ with other software (except as part of the
+ Contributor Version) or other devices; or (3) under
+ Patent Claims infringed by Covered Software in the
+ absence of Modifications made by that Contributor.
+
+ 3. Distribution Obligations.
+
+ 3.1. Availability of Source Code.
+
+ Any Covered Software that You distribute or otherwise make
+ available in Executable form must also be made available in
+ Source Code form and that Source Code form must be
+ distributed only under the terms of this License. You must
+ include a copy of this License with every copy of the
+ Source Code form of the Covered Software You distribute or
+ otherwise make available. You must inform recipients of any
+ such Covered Software in Executable form as to how they can
+ obtain such Covered Software in Source Code form in a
+ reasonable manner on or through a medium customarily used
+ for software exchange.
+
+ 3.2. Modifications.
+
+ The Modifications that You create or to which You
+ contribute are governed by the terms of this License. You
+ represent that You believe Your Modifications are Your
+ original creation(s) and/or You have sufficient rights to
+ grant the rights conveyed by this License.
+
+ 3.3. Required Notices.
+
+ You must include a notice in each of Your Modifications
+ that identifies You as the Contributor of the Modification.
+ You may not remove or alter any copyright, patent or
+ trademark notices contained within the Covered Software, or
+ any notices of licensing or any descriptive text giving
+ attribution to any Contributor or the Initial Developer.
+
+ 3.4. Application of Additional Terms.
+
+ You may not offer or impose any terms on any Covered
+ Software in Source Code form that alters or restricts the
+ applicable version of this License or the recipients’
+ rights hereunder. You may choose to offer, and to charge a
+ fee for, warranty, support, indemnity or liability
+ obligations to one or more recipients of Covered Software.
+ However, you may do so only on Your own behalf, and not on
+ behalf of the Initial Developer or any Contributor. You
+ must make it absolutely clear that any such warranty,
+ support, indemnity or liability obligation is offered by
+ You alone, and You hereby agree to indemnify the Initial
+ Developer and every Contributor for any liability incurred
+ by the Initial Developer or such Contributor as a result of
+ warranty, support, indemnity or liability terms You offer.
+
+
+ 3.5. Distribution of Executable Versions.
+
+ You may distribute the Executable form of the Covered
+ Software under the terms of this License or under the terms
+ of a license of Your choice, which may contain terms
+ different from this License, provided that You are in
+ compliance with the terms of this License and that the
+ license for the Executable form does not attempt to limit
+ or alter the recipient’s rights in the Source Code form
+ from the rights set forth in this License. If You
+ distribute the Covered Software in Executable form under a
+ different license, You must make it absolutely clear that
+ any terms which differ from this License are offered by You
+ alone, not by the Initial Developer or Contributor. You
+ hereby agree to indemnify the Initial Developer and every
+ Contributor for any liability incurred by the Initial
+ Developer or such Contributor as a result of any such terms
+ You offer.
+
+ 3.6. Larger Works.
+
+ You may create a Larger Work by combining Covered Software
+ with other code not governed by the terms of this License
+ and distribute the Larger Work as a single product. In such
+ a case, You must make sure the requirements of this License
+ are fulfilled for the Covered Software.
+
+ 4. Versions of the License.
+
+ 4.1. New Versions.
+
+ Sun Microsystems, Inc. is the initial license steward and
+ may publish revised and/or new versions of this License
+ from time to time. Each version will be given a
+ distinguishing version number. Except as provided in
+ Section 4.3, no one other than the license steward has the
+ right to modify this License.
+
+ 4.2. Effect of New Versions.
+
+ You may always continue to use, distribute or otherwise
+ make the Covered Software available under the terms of the
+ version of the License under which You originally received
+ the Covered Software. If the Initial Developer includes a
+ notice in the Original Software prohibiting it from being
+ distributed or otherwise made available under any
+ subsequent version of the License, You must distribute and
+ make the Covered Software available under the terms of the
+ version of the License under which You originally received
+ the Covered Software. Otherwise, You may also choose to
+ use, distribute or otherwise make the Covered Software
+ available under the terms of any subsequent version of the
+ License published by the license steward.
+
+ 4.3. Modified Versions.
+
+ When You are an Initial Developer and You want to create a
+ new license for Your Original Software, You may create and
+ use a modified version of this License if You: (a) rename
+ the license and remove any references to the name of the
+ license steward (except to note that the license differs
+ from this License); and (b) otherwise make it clear that
+ the license contains terms which differ from this License.
+
+
+ 5. DISCLAIMER OF WARRANTY.
+
+ COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS”
+ BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+ INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
+ SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
+ PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
+ PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY
+ COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
+ INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF
+ ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+ WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
+ ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
+ DISCLAIMER.
+
+ 6. TERMINATION.
+
+ 6.1. This License and the rights granted hereunder will
+ terminate automatically if You fail to comply with terms
+ herein and fail to cure such breach within 30 days of
+ becoming aware of the breach. Provisions which, by their
+ nature, must remain in effect beyond the termination of
+ this License shall survive.
+
+ 6.2. If You assert a patent infringement claim (excluding
+ declaratory judgment actions) against Initial Developer or
+ a Contributor (the Initial Developer or Contributor against
+ whom You assert such claim is referred to as “Participant”)
+ alleging that the Participant Software (meaning the
+ Contributor Version where the Participant is a Contributor
+ or the Original Software where the Participant is the
+ Initial Developer) directly or indirectly infringes any
+ patent, then any and all rights granted directly or
+ indirectly to You by such Participant, the Initial
+ Developer (if the Initial Developer is not the Participant)
+ and all Contributors under Sections 2.1 and/or 2.2 of this
+ License shall, upon 60 days notice from Participant
+ terminate prospectively and automatically at the expiration
+ of such 60 day notice period, unless if within such 60 day
+ period You withdraw Your claim with respect to the
+ Participant Software against such Participant either
+ unilaterally or pursuant to a written agreement with
+ Participant.
+
+ 6.3. In the event of termination under Sections 6.1 or 6.2
+ above, all end user licenses that have been validly granted
+ by You or any distributor hereunder prior to termination
+ (excluding licenses granted to You by any distributor)
+ shall survive termination.
+
+ 7. LIMITATION OF LIABILITY.
+
+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+ (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
+ INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
+ COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
+ LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
+ CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+ LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
+ STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+ COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+ INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+ LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
+ INJURY RESULTING FROM SUCH PARTY’S NEGLIGENCE TO THE EXTENT
+ APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
+ NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
+ CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
+ APPLY TO YOU.
+
+ 8. U.S. GOVERNMENT END USERS.
+
+ The Covered Software is a “commercial item,” as that term is
+ defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of “commercial
+ computer software” (as that term is defined at 48 C.F.R. §
+ 252.227-7014(a)(1)) and “commercial computer software
+ documentation” as such terms are used in 48 C.F.R. 12.212 (Sept.
+ 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
+ through 227.7202-4 (June 1995), all U.S. Government End Users
+ acquire Covered Software with only those rights set forth herein.
+ This U.S. Government Rights clause is in lieu of, and supersedes,
+ any other FAR, DFAR, or other clause or provision that addresses
+ Government rights in computer software under this License.
+
+ 9. MISCELLANEOUS.
+
+ This License represents the complete agreement concerning subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the
+ extent necessary to make it enforceable. This License shall be
+ governed by the law of the jurisdiction specified in a notice
+ contained within the Original Software (except to the extent
+ applicable law, if any, provides otherwise), excluding such
+ jurisdiction’s conflict-of-law provisions. Any litigation
+ relating to this License shall be subject to the jurisdiction of
+ the courts located in the jurisdiction and venue specified in a
+ notice contained within the Original Software, with the losing
+ party responsible for costs, including, without limitation, court
+ costs and reasonable attorneys’ fees and expenses. The
+ application of the United Nations Convention on Contracts for the
+ International Sale of Goods is expressly excluded. Any law or
+ regulation which provides that the language of a contract shall
+ be construed against the drafter shall not apply to this License.
+ You agree that You alone are responsible for compliance with the
+ United States export administration regulations (and the export
+ control laws and regulation of any other countries) when You use,
+ distribute or otherwise make available any Covered Software.
+
+ 10. RESPONSIBILITY FOR CLAIMS.
+
+ As between Initial Developer and the Contributors, each party is
+ responsible for claims and damages arising, directly or
+ indirectly, out of its utilization of rights under this License
+ and You agree to work with Initial Developer and Contributors to
+ distribute such responsibility on an equitable basis. Nothing
+ herein is intended or shall be deemed to constitute any admission
+ of liability.
diff --git a/Docs/oneliners.txt b/Docs/oneliners.txt
new file mode 100644
index 000000000000..fca2aa313e2f
--- /dev/null
+++ b/Docs/oneliners.txt
@@ -0,0 +1,81 @@
+#
+# DTrace OneLiners
+#
+
+DTrace One Liners,
+
+# New processes with arguments,
+dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }'
+
+# Files opened by process name,
+dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }'
+
+# Files created using creat() by process name,
+dtrace -n 'syscall::creat*:entry { printf("%s %s",execname,copyinstr(arg0)); }'
+
+# Syscall count by process name,
+dtrace -n 'syscall:::entry { @num[execname] = count(); }'
+
+# Syscall count by syscall,
+dtrace -n 'syscall:::entry { @num[probefunc] = count(); }'
+
+# Syscall count by process ID,
+dtrace -n 'syscall:::entry { @num[pid,execname] = count(); }'
+
+# Read bytes by process name,
+dtrace -n 'sysinfo:::readch { @bytes[execname] = sum(arg0); }'
+
+# Write bytes by process name,
+dtrace -n 'sysinfo:::writech { @bytes[execname] = sum(arg0); }'
+
+# Read size distribution by process name,
+dtrace -n 'sysinfo:::readch { @dist[execname] = quantize(arg0); }'
+
+# Write size distribution by process name,
+dtrace -n 'sysinfo:::writech { @dist[execname] = quantize(arg0); }'
+
+# Disk size by process ID,
+dtrace -n 'io:::start { printf("%d %s %d",pid,execname,args[0]->b_bcount); }'
+
+# Disk size aggregation
+dtrace -n 'io:::start { @size[execname] = quantize(args[0]->b_bcount); }'
+
+# Pages paged in by process name,
+dtrace -n 'vminfo:::pgpgin { @pg[execname] = sum(arg0); }'
+
+# Minor faults by process name,
+dtrace -n 'vminfo:::as_fault { @mem[execname] = sum(arg0); }'
+
+# Interrupts by CPU,
+dtrace -n 'sdt:::interrupt-start { @num[cpu] = count(); }'
+
+# CPU cross calls by process name,
+dtrace -n 'sysinfo:::xcalls { @num[execname] = count(); }'
+
+# Lock time by process name,
+dtrace -n 'lockstat:::adaptive-block { @time[execname] = sum(arg1); }'
+
+# Lock distribution by process name,
+dtrace -n 'lockstat:::adaptive-block { @time[execname] = quantize(arg1); }'
+
+# Kernel funtion calls by module
+dtrace -n 'fbt:::entry { @calls[probemod] = count(); }'
+
+# Stack size for processes
+dtrace -n 'sched:::on-cpu { @[execname] = max(curthread->t_procp->p_stksize);}'
+
+# Kill all top processes when they are invoked,
+dtrace -wn 'syscall::exece:return /execname == "top"/ { raise(9); }'
+
+
+
+DTrace Longer One Liners,
+
+# New processes with arguments and time,
+dtrace -qn 'syscall::exec*:return { printf("%Y %s\n",walltimestamp,curpsinfo->pr_psargs); }'
+
+# Successful signal details,
+dtrace -n 'proc:::signal-send /pid/ { printf("%s -%d %d",execname,args[2],args[1]->pr_pid); }'
+
+
+
diff --git a/Examples/Copyright b/Examples/Copyright
new file mode 100644
index 000000000000..d802fe9086b4
--- /dev/null
+++ b/Examples/Copyright
@@ -0,0 +1 @@
+The examples in this directory are copyright to their author.
diff --git a/Examples/Readme b/Examples/Readme
new file mode 100644
index 000000000000..762a3312abf8
--- /dev/null
+++ b/Examples/Readme
@@ -0,0 +1,21 @@
+Examples - Script demos, screenshots, and how to read the output
+
+ This directory contains an example file per script in the DTraceToolkit.
+
+ When I hear of a new performance tool or what not, the first thing I want
+ to see are screenshots. They illustrate,
+
+ - generally what the tool is for
+ - many details and features, since the output is (supposed to be)
+ as intuitive as possible
+ - how to use the tool (command line usage)
+
+ It is a rapid way to get a handle on what a tool generally is, and how
+ to start using it. The files in this directory serve that purpose.
+
+ These are especially important now that the DTraceToolkit has over 200
+ scripts. Flicking through these files and seeing the screenshots may
+ be the quickest way to find what you are after.
+
+ Of course, don't forget to read the man pages and notes files too :)
+
diff --git a/Examples/anonpgpid_example.txt b/Examples/anonpgpid_example.txt
new file mode 100644
index 000000000000..b505f3d1596f
--- /dev/null
+++ b/Examples/anonpgpid_example.txt
@@ -0,0 +1,73 @@
+The following is a demonstration of the anonpgpid.d script,
+
+
+Here we run it on a system that is implementing memory caps using the
+resource capping daemon, "rcapd",
+
+ # anonpgpid.d
+ Tracing... Hit Ctrl-C to end.
+ ^C
+ PID CMD D BYTES
+ 6215 bash R 8192
+ 6215 bash W 126976
+ 5809 rcapd R 245760
+ 6222 memleak.pl R 974848
+ 6222 memleak.pl W 3055616
+
+The "memleak.pl" process consumes memory, and we can see above that it has
+encountered both reads and writes to the physical swap device - it is being
+paged out. A bash shell was also effected (which was in the same project that
+rcapd was monitoring).
+
+
+
+The following is an ordinary system that is very low on memory,
+
+ # anonpgpid.d
+ Tracing... Hit Ctrl-C to end.
+ ^C
+ PID CMD D BYTES
+ 18885 sendmail R 4096
+ 18600 automountd R 4096
+ 1 init R 4096
+ 2456 inetd R 8192
+ 18546 nscd R 8192
+ 2400 bash R 12288
+ 217 utmpd R 28672
+ 221 ttymon R 32768
+ 210 sac R 36864
+ 18777 snmpd R 49152
+ 18440 init R 49152
+ 89 nscd R 61440
+ 318 syslogd R 73728
+ 487 snmpd R 81920
+ 2453 inetd R 102400
+ 165 in.routed R 131072
+ 294 automountd R 135168
+ 215 inetd R 135168
+ 187 rpcbind R 204800
+ 86 kcfd R 290816
+ 7 svc.startd R 1015808
+ 9 svc.configd R 1478656
+ 2 pageout W 23453696
+
+The "pageout" process is responsible for writing all the anonymous memory
+pages to the physical swap device, and we can see from the above that it
+has written 23 Mb. When processes access anonymous memory that has been
+swapped out, a major fault occurs and the memory is paged back in; in this
+case we can trace the process that was effected, and from the above we can
+see that several processes have been effected by the memory pressure.
+The most is "svc.configd", which needed to page back in 1.4 Mb of anonymous
+memory.
+
+
+
+Sometimes anonpgpid.d doesn't help too much. Here we only have pageouts
+to the physical swap device and no pageins,
+
+ # anonpgpid.d
+ ^C
+ PID CMD D BYTES
+ 2 pageout W 61083648
+
+Only pageout is identified.
diff --git a/Examples/bitesize_example.txt b/Examples/bitesize_example.txt
new file mode 100644
index 000000000000..dcc697d5070d
--- /dev/null
+++ b/Examples/bitesize_example.txt
@@ -0,0 +1,74 @@
+In this example, bitesize.d was run for several seconds then Ctrl-C was hit.
+As bitesize.d runs it records how processes on the system are accessing the
+disks - in particular the size of the I/O operation. It is usually desirable
+for processes to be requesting large I/O operations rather than taking many
+small "bites".
+
+The final report highlights how processes performed. The find command mostly
+read 1K blocks while the tar command was reading large blocks - both as
+expected.
+
+ # bitesize.d
+ Tracing... Hit Ctrl-C to end.
+ ^C
+
+ PID CMD
+ 7110 -bash\0
+
+ value ------------- Distribution ------------- count
+ 512 | 0
+ 1024 |@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
+ 2048 | 0
+ 4096 |@@@@@@@@@@@@@ 1
+ 8192 | 0
+
+ 7110 sync\0
+
+ value ------------- Distribution ------------- count
+ 512 | 0
+ 1024 |@@@@@ 1
+ 2048 |@@@@@@@@@@ 2
+ 4096 | 0
+ 8192 |@@@@@@@@@@@@@@@@@@@@@@@@@ 5
+ 16384 | 0
+
+ 0 sched\0
+
+ value ------------- Distribution ------------- count
+ 1024 | 0
+ 2048 |@@@ 1
+ 4096 | 0
+ 8192 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10
+ 16384 | 0
+
+ 7109 find /\0
+
+ value ------------- Distribution ------------- count
+ 512 | 0
+ 1024 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1452
+ 2048 |@@ 91
+ 4096 | 33
+ 8192 |@@ 97
+ 16384 | 0
+
+ 3 fsflush\0
+
+ value ------------- Distribution ------------- count
+ 4096 | 0
+ 8192 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 449
+ 16384 | 0
+
+ 7108 tar cf /dev/null /\0
+
+ value ------------- Distribution ------------- count
+ 256 | 0
+ 512 | 70
+ 1024 |@@@@@@@@@@ 1306
+ 2048 |@@@@ 569
+ 4096 |@@@@@@@@@ 1286
+ 8192 |@@@@@@@@@@ 1403
+ 16384 |@ 190
+ 32768 |@@@ 396
+ 65536 | 0
+
+
diff --git a/Examples/connections_example.txt b/Examples/connections_example.txt
new file mode 100644
index 000000000000..e39d063113a8
--- /dev/null
+++ b/Examples/connections_example.txt
@@ -0,0 +1,23 @@
+The following is an example of connections. As inbound TCP connections are
+established their details are printed out. This includes the UID, PID and
+CMD of the server process that is listening on that port,
+
+ # connections
+ UID PID CMD TYPE PORT IP_SOURCE
+ 0 242 inetd tcp 79 192.168.1.1
+ 0 359 sshd tcp 22 192.168.1.1
+ 100 1532 Xorg tcp 6000 192.168.1.1
+ ^C
+
+
+In another window snoop was running for comparison,
+
+ # snoop 'tcp[13:1] = 0x02'
+ Using device /dev/rtls0 (promiscuous mode)
+ mars -> jupiter FINGER C port=56760
+ mars -> jupiter TCP D=22 S=56761 Syn Seq=3264782212 Len=0 ...
+ mars -> jupiter XWIN C port=56763
+
+snoop can already tell me that these connections are happening - but does not
+print out details of the server that accepted the connection.
+
diff --git a/Examples/cpudists_example.txt b/Examples/cpudists_example.txt
new file mode 100644
index 000000000000..aa8256b7b7a9
--- /dev/null
+++ b/Examples/cpudists_example.txt
@@ -0,0 +1,276 @@
+The following demonstrates the cpudists program. It prints distributions
+of CPU time consumed by the Kernel, Idle thread, or Processes.
+
+Here we run cpudists for 5 seconds once,
+
+# ./cpudists 5 1
+2005 Apr 28 00:08:42,
+ KERNEL
+ value ------------- Distribution ------------- count
+ 4096 | 0
+ 8192 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1134
+ 16384 |@@@@@@@@@ 344
+ 32768 |@@@ 104
+ 65536 | 3
+ 131072 | 0
+ 262144 | 1
+ 524288 | 0
+ 1048576 | 11
+ 2097152 | 0
+
+ PROCESS
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@ 170
+ 32768 |@@@@@@@@@@@@@@@@@@ 331
+ 65536 |@@@@@@@@ 152
+ 131072 |@ 17
+ 262144 |@ 25
+ 524288 |@ 13
+ 1048576 | 4
+ 2097152 | 9
+ 4194304 | 0
+
+ IDLE
+ value ------------- Distribution ------------- count
+ 2097152 | 0
+ 4194304 |@ 9
+ 8388608 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 418
+ 16777216 |@@@ 31
+ 33554432 | 0
+
+The value indicates the time in nanoseconds, the count the number of
+runs for this length.
+
+From the above, we can see the kernel has run many times - but for short
+intervals each time. Processes have taken fom 10 to 60 microseconds;
+and when the idle thread runs it runs for some time - around 8 milliseconds
+for each.
+
+
+
+
+cpudists has a "-a" option for all processes,
+
+# ./cpudists -a 5 1
+2005 Apr 28 00:17:34,
+ mapping-daemon
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
+ 32768 |@@@@@@@@@@@@@ 1
+ 65536 | 0
+
+ sendmail
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
+ 32768 | 0
+ 65536 |@@@@@@@@@@@@@ 1
+ 131072 | 0
+
+ nautilus
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
+ 32768 | 0
+ 65536 |@@@@@@@@@@@@@ 1
+ 131072 | 0
+
+ fmd
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
+ 32768 | 0
+ 65536 |@@@@@@@@@@@@@ 1
+ 131072 | 0
+
+ in.routed
+ value ------------- Distribution ------------- count
+ 65536 | 0
+ 131072 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 262144 | 0
+
+ miniserv.pl
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
+ 32768 | 0
+ 65536 | 0
+ 131072 |@@@@@@@@@@@@@ 1
+ 262144 | 0
+
+ xscreensaver
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@ 2
+ 32768 | 0
+ 65536 |@@@@@@@@@@@@@@@@@@@@ 2
+ 131072 | 0
+
+gnome-vfs-daemon
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@ 3
+ 32768 | 0
+ 65536 |@@@@@@@@@@@@@@@@ 2
+ 131072 | 0
+
+ gnome-panel
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@ 1
+ 32768 |@@@@@@@@@@@@@@@@ 2
+ 65536 | 0
+ 131072 |@@@@@@@@@@@@@@@@ 2
+ 262144 | 0
+
+ svc.startd
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10
+ 32768 |@@@@@@@@@@@ 4
+ 65536 |@@@ 1
+ 131072 | 0
+
+ nscd
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 25
+ 32768 |@ 1
+ 65536 | 0
+ 131072 |@ 1
+ 262144 | 0
+
+gnome-netstatus-
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
+ 32768 | 0
+ 65536 | 0
+ 131072 | 0
+ 262144 | 0
+ 524288 | 0
+ 1048576 |@@@@@@@@@@@@@ 1
+ 2097152 | 0
+
+ mixer_applet2
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@ 10
+ 32768 |@@@@@@@@@@@@@@@@@ 19
+ 65536 |@@@@@@@@@@@@@@ 16
+ 131072 | 0
+
+ soffice.bin
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@ 7
+ 32768 |@@@@@@@@@@@@@@@@@@@ 14
+ 65536 |@@@@@@@@ 6
+ 131072 | 0
+ 262144 |@@@ 2
+ 524288 | 0
+ 1048576 | 0
+ 2097152 |@ 1
+ 4194304 | 0
+
+ dtrace
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@ 8
+ 32768 | 0
+ 65536 | 0
+ 131072 | 0
+ 262144 |@@@ 1
+ 524288 |@@@@@@@@@ 3
+ 1048576 | 0
+ 2097152 |@@@ 1
+ 4194304 | 0
+
+ Xorg
+ value ------------- Distribution ------------- count
+ 32768 | 0
+ 65536 |@@@@@@@@@@@@@@@@@@@@ 15
+ 131072 |@@@@@@@@ 6
+ 262144 |@@@@@@@@@@@@ 9
+ 524288 | 0
+
+ java_vm
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@ 101
+ 32768 |@@@@@@@@@@@@@@@@ 84
+ 65536 |@@@@ 20
+ 131072 | 0
+
+ gnome-terminal
+ value ------------- Distribution ------------- count
+ 16384 | 0
+ 32768 |@@@@@@@@@@@@@@@@ 12
+ 65536 |@@@@@@@@@@@ 8
+ 131072 |@ 1
+ 262144 | 0
+ 524288 |@@@@@@@@@@@@ 9
+ 1048576 | 0
+
+ acroread
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 | 1
+ 32768 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 188
+ 65536 |@@@@@@@@ 47
+ 131072 |@@ 10
+ 262144 | 0
+
+ mozilla-bin
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@ 21
+ 32768 |@@@@@ 13
+ 65536 |@@@@@@@@@@@@@ 36
+ 131072 |@@@@@@@ 19
+ 262144 |@@@ 9
+ 524288 |@@ 5
+ 1048576 |@ 2
+ 2097152 |@@ 5
+ 4194304 | 0
+
+ KERNEL
+ value ------------- Distribution ------------- count
+ 4096 | 0
+ 8192 |@@@@@@@@@@@@@@@@@@@@@@@@@@ 1085
+ 16384 |@@@@@@@@@@@ 443
+ 32768 |@@ 98
+ 65536 | 5
+ 131072 | 1
+ 262144 | 1
+ 524288 | 0
+ 1048576 | 11
+ 2097152 | 0
+
+ fsflush
+ value ------------- Distribution ------------- count
+ 131072 | 0
+ 262144 |@@@@@@@ 1
+ 524288 | 0
+ 1048576 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4
+ 2097152 | 0
+ 4194304 | 0
+ 8388608 | 0
+ 16777216 | 0
+ 33554432 |@@@@@@@ 1
+ 67108864 | 0
+
+ IDLE
+ value ------------- Distribution ------------- count
+ 524288 | 0
+ 1048576 | 1
+ 2097152 | 0
+ 4194304 |@ 13
+ 8388608 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 411
+ 16777216 |@@@ 31
+ 33554432 | 0
+
+
+
diff --git a/Examples/cputimes_example.txt b/Examples/cputimes_example.txt
new file mode 100644
index 000000000000..253a7a34bd6e
--- /dev/null
+++ b/Examples/cputimes_example.txt
@@ -0,0 +1,210 @@
+The following demonstrates running the cputimes program on an idle system.
+We use an interval of 1 second and a count of 3,
+
+ # ./cputimes 1 3
+ 2005 Apr 27 23:37:58,
+ THREADS TIME (ns)
+ KERNEL 10795499
+ PROCESS 20941091
+ IDLE 970707443
+ 2005 Apr 27 23:37:59,
+ THREADS TIME (ns)
+ KERNEL 8919418
+ PROCESS 77446789
+ IDLE 910555040
+ 2005 Apr 27 23:38:00,
+ THREADS TIME (ns)
+ KERNEL 8615123
+ PROCESS 78314246
+ IDLE 810100417
+
+In the above output, we can see a breakdown of CPU time into the catagories
+KERNEL, PROCESS and IDLE. The time is measured in nanoseconds. Most of the
+time is in the IDLE category, as the system is idle. Very little time
+was spent serving the kernel.
+
+
+
+
+In the following example, several programs are run to hog the CPUs,
+
+ # ./cputimes 1 3
+ 2005 Apr 27 23:40:58,
+ THREADS TIME (ns)
+ KERNEL 11398807
+ PROCESS 992254664
+ 2005 Apr 27 23:40:59,
+ THREADS TIME (ns)
+ KERNEL 9205260
+ PROCESS 987561182
+ 2005 Apr 27 23:41:00,
+ THREADS TIME (ns)
+ KERNEL 9196669
+ PROCESS 877850474
+
+Now there is no IDLE category, as the system is 100% utilised.
+The programs were the following,
+
+ while :; do :; done &
+
+which keeps the CPU busy.
+
+
+
+
+In the following example a different style of program is run to hog the CPUs,
+
+ while :; do date; done
+
+This causes many processes to be created and destroyed in a hurry, and can
+be difficult to troubleshoot (tools like prstat cannot sample quick enough
+to easily identify what is going on). The following is the cputimes output,
+
+ # ./cputimes 1 3
+ 2005 Apr 27 23:45:30,
+ THREADS TIME (ns)
+ KERNEL 192647392
+ PROCESS 835397568
+ 2005 Apr 27 23:45:31,
+ THREADS TIME (ns)
+ KERNEL 168773713
+ PROCESS 810825730
+ 2005 Apr 27 23:45:32,
+ THREADS TIME (ns)
+ KERNEL 151676122
+ PROCESS 728477272
+
+Now the kernel is doing a substantial amount of work to create and destroy
+these processes.
+
+
+
+
+In the following example, a large amount of network activity occurs while
+cputimes is running,
+
+ # ./cputimes 1 6
+ 2005 Apr 27 23:49:29,
+ THREADS TIME (ns)
+ KERNEL 10596399
+ PROCESS 21793920
+ IDLE 974395713
+ 2005 Apr 27 23:49:30,
+ THREADS TIME (ns)
+ KERNEL 251465759
+ IDLE 357436576
+ PROCESS 508986422
+ 2005 Apr 27 23:49:31,
+ THREADS TIME (ns)
+ IDLE 9758227
+ KERNEL 367645318
+ PROCESS 385427847
+ 2005 Apr 27 23:49:32,
+ THREADS TIME (ns)
+ IDLE 28351679
+ KERNEL 436022725
+ PROCESS 451304688
+ 2005 Apr 27 23:49:33,
+ THREADS TIME (ns)
+ KERNEL 262586158
+ PROCESS 325238896
+ IDLE 358243503
+ 2005 Apr 27 23:49:34,
+ THREADS TIME (ns)
+ KERNEL 10075578
+ PROCESS 238170506
+ IDLE 647956998
+
+Initially the system is idle. A command is run to cause heavy network
+activity, which peaks during the fourth sample - during which the kernel
+is using around 40% of the CPU. The Solaris 10 command "intrstat" can
+help to analyse this activity further.
+
+
+
+
+Longer samples are possible. The following is a 60 second sample,
+
+ # ./cputimes 60 1
+ 2005 Apr 27 23:53:02,
+ THREADS TIME (ns)
+ KERNEL 689808449
+ PROCESS 8529562214
+ IDLE 50406951876
+ #
+
+
+
+
+cputimes has a "-a" option to print all processes. The following is a
+single 1 second sample with -a,
+
+ # ./cputimes -a 1 1
+ 2005 Apr 28 00:00:32,
+ THREADS TIME (ns)
+ svc.startd 51042
+ nautilus 130645
+ in.routed 131823
+ fmd 152822
+ nscd 307042
+ dsdm 415799
+ mixer_applet2 551066
+ gnome-smproxy 587234
+ xscreensaver 672270
+ fsflush 1060196
+ java_vm 1552988
+ wnck-applet 2060870
+ dtrace 2398658
+ acroread 2614687
+ soffice.bin 2825117
+ mozilla-bin 5497488
+ KERNEL 13541120
+ metacity 28924204
+ gnome-terminal 74304348
+ Xorg 289631407
+ IDLE 465054209
+
+The times are in nanoseconds, and multiple processes with the same name
+have their times aggregated. The above output is at an amazing resolution -
+svc.startd ran for 51 microseconds, and soffice.bin ran for 28 milliseconds.
+
+
+
+
+The following is a 10 second sample on an idle desktop,
+
+ # ./cputimes -a 10 1
+ 2005 Apr 28 00:03:57,
+ THREADS TIME (ns)
+ snmpd 127859
+ fmd 171897
+ inetd 177134
+ svc.configd 185006
+ mapping-daemon 197674
+ miniserv.pl 305603
+ gconfd-2 330511
+ xscreensaver 443207
+ sendmail 473434
+ nautilus 506799
+ gnome-vfs-daemon 549037
+ gnome-panel 770631
+ nscd 885353
+ svc.startd 1181286
+ gnome-netstatus- 4329671
+ mixer_applet2 4833519
+ dtrace 6244366
+ in.routed 6556075
+ fsflush 9553155
+ soffice.bin 13954327
+ java_vm 16285243
+ acroread 32126193
+ gnome-terminal 34891991
+ Xorg 35553412
+ mozilla-bin 67855629
+ KERNEL 94834997
+ IDLE 9540941846
+
+Wow, maybe not as idle as I thought!
+
+
+
diff --git a/Examples/cputypes_example.txt b/Examples/cputypes_example.txt
new file mode 100644
index 000000000000..158a43f15875
--- /dev/null
+++ b/Examples/cputypes_example.txt
@@ -0,0 +1,40 @@
+The following are demonstrations of the cputypes.d script,
+
+
+This is running cputypes.d on a desktop,
+
+ # cputypes.d
+ CPU CHIP PSET LGRP CLOCK TYPE FPU
+ 0 0 0 0 867 i386 i387 compatible
+
+fairly boring.
+
+
+
+The following is a multi CPU x86 server,
+
+ # cputypes.d
+ CPU CHIP PSET LGRP CLOCK TYPE FPU
+ 0 0 0 0 2791 i386 i387 compatible
+ 1 3 1 0 2791 i386 i387 compatible
+ 2 0 0 0 2791 i386 i387 compatible
+ 3 3 0 0 2791 i386 i387 compatible
+
+Much more interesting! We can see from the CHIP field that there is actually
+two CPUs, each with two cores. There is also two processor sets (0, 1).
+
+The CPUs were printed in CPU id order by mere chance.
+
+
+
+Here is a multi CPU SPARC server,
+
+ # cputypes.d
+ CPU CHIP PSET LGRP CLOCK TYPE FPU
+ 0 0 0 0 400 sparcv9 sparcv9
+ 1 1 0 0 400 sparcv9 sparcv9
+ 4 4 0 0 400 sparcv9 sparcv9
+ 5 5 0 0 400 sparcv9 sparcv9
+
+
+
diff --git a/Examples/cpuwalk_example.txt b/Examples/cpuwalk_example.txt
new file mode 100644
index 000000000000..34afa959815e
--- /dev/null
+++ b/Examples/cpuwalk_example.txt
@@ -0,0 +1,85 @@
+The following is a demonstration of the cpuwalk.d script,
+
+
+cpuwalk.d is not that useful on a single CPU server,
+
+ # cpuwalk.d
+ Sampling... Hit Ctrl-C to end.
+ ^C
+
+ PID: 18843 CMD: bash
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 30
+ 1 | 0
+
+ PID: 8079 CMD: mozilla-bin
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10
+ 1 | 0
+
+The output above shows that PID 18843, "bash", was sampled on CPU 0 a total
+of 30 times (we sample at 1000 hz).
+
+
+
+The following is a demonstration of running cpuwalk.d with a 5 second
+duration. This is on a 4 CPU server running a multithreaded CPU bound
+application called "cputhread",
+
+ # cpuwalk.d 5
+ Sampling...
+
+ PID: 3 CMD: fsflush
+
+ value ------------- Distribution ------------- count
+ 1 | 0
+ 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 30
+ 3 | 0
+
+ PID: 12186 CMD: cputhread
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@ 4900
+ 1 |@@@@@@@@@@ 4900
+ 2 |@@@@@@@@@@ 4860
+ 3 |@@@@@@@@@@ 4890
+ 4 | 0
+
+As we are sampling at 1000 hz, the application cputhread is indeed running
+concurrently across all available CPUs. We measured the applicaiton on
+CPU 0 a total of 4900 times, on CPU 1 a total of 4900 times, etc. As there
+are around 5000 samples per CPU available in this 5 second 1000 hz sample,
+the application is using almost all the CPU capacity in this server well.
+
+
+
+The following is a similar demonstration, this time running a multithreaded
+CPU bound application called "cpuserial" that has a poor use of locking
+such that the threads "serialise",
+
+
+ # cpuwalk.d 5
+ Sampling...
+
+ PID: 12194 CMD: cpuserial
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@ 470
+ 1 |@@@@@@ 920
+ 2 |@@@@@@@@@@@@@@@@@@@@@@@@@ 3840
+ 3 |@@@@@@ 850
+ 4 | 0
+
+In the above, we can see that this CPU bound application is not making
+efficient use of the CPU resources available, only reaching 3840 samples
+on CPU 2 out of a potential 5000. This problem was caused by a poor use
+of locks.
+
+
+
diff --git a/Examples/crash_example.txt b/Examples/crash_example.txt
new file mode 100644
index 000000000000..f0034d3b74d9
--- /dev/null
+++ b/Examples/crash_example.txt
@@ -0,0 +1,68 @@
+The following is an example of the crashed application script, crash.d
+This demonstration is for version 0.80 of crash.d, newer versions may
+produce enhanced output.
+
+Here is the report generated as crash.d catches a crashing procmail process,
+
+# ./crash.d
+Waiting for crashing applications...
+
+-----------------------------------------------------
+CRASH DETECTED at 2005 May 30 19:41:34
+-----------------------------------------------------
+Type: SIGSEGV
+Program: procmail
+Args: procmail -m\0
+PID: 2877
+TID: 1
+LWPs: 1
+PPID: 1778
+UID: 100
+GID: 1
+TaskID: 76
+ProjID: 3
+PoolID: 0
+ZoneID: 0
+zone: global
+CWD: /usr/include/sys
+errno: 0
+
+User Stack Backtrace,
+ procmail`sendcomsat+0x24
+ procmail`Terminate+0x76
+ procmail`0x805a2b0
+ procmail`0x805a40f
+ libc.so.1`__sighndlr+0xf
+ libc.so.1`call_user_handler+0x22b
+ libc.so.1`sigacthandler+0xbb
+ 0xffffffff
+ procmail`rread+0x1d
+ procmail`0x805bcb4
+ procmail`read2blk+0x6b
+ procmail`readdyn+0x1f
+ procmail`readmail+0x181
+ procmail`main+0x532
+ procmail`_start+0x5d
+
+Kernel Stack Backtrace,
+ genunix`sigaddqa+0x3f
+ genunix`trapsig+0xdb
+ unix`trap+0xc2b
+ unix`_cmntrap+0x83
+
+Ansestors,
+ 2877 procmail -m\0
+ 1778 bash\0
+ 1777 xterm -bg black -fg grey70 -sl 500 -vb\0
+ 1 /sbin/init\0
+ 0 sched\0
+
+Times,
+ User: 0 ticks
+ Sys: 1 ticks
+ Elapsed: 3307 ms
+
+Sizes,
+ Heap: 16388 bytes
+ Stack: 8192 bytes
+
diff --git a/Examples/creatbyproc_example.txt b/Examples/creatbyproc_example.txt
new file mode 100644
index 000000000000..295e07ff2fbb
--- /dev/null
+++ b/Examples/creatbyproc_example.txt
@@ -0,0 +1,23 @@
+The following is an example of the creatbyproc.d script,
+
+
+Here we run creatbyproc.d for several seconds,
+
+ # ./creatbyproc.d
+ dtrace: script './creatbyproc.d' matched 2 probes
+ CPU ID FUNCTION:NAME
+ 0 5438 creat64:entry touch /tmp/newfile
+ 0 5438 creat64:entry sh /tmp/mpLaaOik
+ 0 5438 creat64:entry sh /dev/null
+ ^C
+
+In another window, the following commands were run,
+
+ touch /tmp/newfile
+ man ls
+
+The file creation activity caused by these commands can be seen in the
+output by creatbyproc.d
+
+
+
diff --git a/Examples/cswstat_example.txt b/Examples/cswstat_example.txt
new file mode 100644
index 000000000000..d45347c64f33
--- /dev/null
+++ b/Examples/cswstat_example.txt
@@ -0,0 +1,25 @@
+The following is an example of the cswstat.d script,
+
+ # cswstat.d
+ TIME NUM CSWTIME AVGTIME
+ 2005 May 17 01:57:21 276 2407 8
+ 2005 May 17 01:57:22 283 2251 7
+ 2005 May 17 01:57:23 259 2098 8
+ 2005 May 17 01:57:24 268 2169 8
+ 2005 May 17 01:57:25 1248 10864 8
+ 2005 May 17 01:57:26 2421 21263 8
+ 2005 May 17 01:57:27 2183 19804 9
+ 2005 May 17 01:57:28 1980 18640 9
+ 2005 May 17 01:57:29 794 7422 9
+ 2005 May 17 01:57:30 275 2233 8
+ 2005 May 17 01:57:31 288 2338 8
+ 2005 May 17 01:57:32 545 4154 7
+ 2005 May 17 01:57:33 264 2149 8
+ ^C
+
+In the above output, the average context switch time is 8 microseconds.
+During the sample there was a burst of activity, increasing the number
+of context switches per second from around 270 to over 2000. The time
+consumed by all of these context switches in total is printed, peaking
+at 21 ms.
+
diff --git a/Examples/dappprof_example.txt b/Examples/dappprof_example.txt
new file mode 100644
index 000000000000..a2c3935939c2
--- /dev/null
+++ b/Examples/dappprof_example.txt
@@ -0,0 +1,71 @@
+The following is a demonstration of the dappprof command,
+
+This is the usage for version 0.60,
+
+ # dappprof -h
+ USAGE: dappprof [-cehoTU] [-u lib] { -p PID | command }
+
+ -p PID # examine this PID
+ -a # print all details
+ -c # print syscall counts
+ -e # print elapsed times (us)
+ -o # print on cpu times
+ -T # print totals
+ -u lib # trace this library instead
+ -U # trace all libraries + user funcs
+ -b bufsize # dynamic variable buf size
+ eg,
+ dappprof df -h # run and examine "df -h"
+ dappprof -p 1871 # examine PID 1871
+ dappprof -ap 1871 # print all data
+
+
+
+The following shows running dappprof with the "banner hello" command.
+Elapsed and on-cpu times are printed (-eo), as well as counts (-c) and
+totals (-T),
+
+ # dappprof -eocT banner hello
+
+ # # ###### # # ####
+ # # # # # # #
+ ###### ##### # # # #
+ # # # # # # #
+ # # # # # # #
+ # # ###### ###### ###### ####
+
+
+ CALL COUNT
+ __fsr 1
+ main 1
+ banprt 1
+ banner 1
+ banset 1
+ convert 5
+ banfil 5
+ TOTAL: 15
+
+ CALL ELAPSED
+ banset 37363
+ banfil 147407
+ convert 149606
+ banprt 423507
+ banner 891088
+ __fsr 1694349
+ TOTAL: 3343320
+
+ CALL CPU
+ banset 7532
+ convert 8805
+ banfil 11092
+ __fsr 15708
+ banner 48696
+ banprt 388853
+ TOTAL: 480686
+
+The above output has analysed user functions (the default). It makes it
+easy to identify which function is being called the most (COUNT), which
+is taking the most time (ELAPSED), and which is consuming the most CPU (CPU).
+These times are totals for all the functions called.
+
+
diff --git a/Examples/dapptrace_example.txt b/Examples/dapptrace_example.txt
new file mode 100644
index 000000000000..f19606ceca51
--- /dev/null
+++ b/Examples/dapptrace_example.txt
@@ -0,0 +1,215 @@
+The following is a demonstration of the dapptrace command,
+
+This is the usage for version 0.60,
+
+ # dapptrace -h
+ USAGE: dapptrace [-acdeholFLU] [-u lib] { -p PID | command }
+
+ -p PID # examine this PID
+ -a # print all details
+ -c # print syscall counts
+ -d # print relative times (us)
+ -e # print elapsed times (us)
+ -F # print flow indentation
+ -l # print pid/lwpid
+ -o # print CPU on cpu times
+ -u lib # trace this library instead
+ -U # trace all libraries + user funcs
+ -b bufsize # dynamic variable buf size
+ eg,
+ dapptrace df -h # run and examine "df -h"
+ dapptrace -p 1871 # examine PID 1871
+ dapptrace -Fp 1871 # print using flow indents
+ dapptrace -eop 1871 # print elapsed and CPU times
+
+
+
+The following is an example of the default output. We run dapptrace with
+the "banner hello" command,
+
+ # dapptrace banner hi
+
+ # # #
+ # # #
+ ###### #
+ # # #
+ # # #
+ # # #
+
+ CALL(args) = return
+ -> __fsr(0x2, 0x8047D7C, 0x8047D88)
+ <- __fsr = 122
+ -> main(0x2, 0x8047D7C, 0x8047D88)
+ -> banner(0x8047E3B, 0x80614C2, 0x8047D38)
+ -> banset(0x20, 0x80614C2, 0x8047DCC)
+ <- banset = 36
+ -> convert(0x68, 0x8047DCC, 0x2)
+ <- convert = 319
+ -> banfil(0x8061412, 0x80614C2, 0x8047DCC)
+ <- banfil = 57
+ -> convert(0x69, 0x8047DCC, 0x2)
+ <- convert = 319
+ -> banfil(0x8061419, 0x80614CA, 0x8047DCC)
+ <- banfil = 57
+ <- banner = 118
+ -> banprt(0x80614C2, 0x8047D38, 0xD27FB824)
+ <- banprt = 74
+
+The default output shows user function calls. An entry is prefixed
+with a "->", and the return has a "<-".
+
+
+
+Here we run dapptrace with the -F for flow indent option,
+
+ # dapptrace -F banner hi
+
+ # # #
+ # # #
+ ###### #
+ # # #
+ # # #
+ # # #
+
+ CALL(args) = return
+ -> __fsr(0x2, 0x8047D7C, 0x8047D88)
+ <- __fsr = 122
+ -> main(0x2, 0x8047D7C, 0x8047D88)
+ -> banner(0x8047E3B, 0x80614C2, 0x8047D38)
+ -> banset(0x20, 0x80614C2, 0x8047DCC)
+ <- banset = 36
+ -> convert(0x68, 0x8047DCC, 0x2)
+ <- convert = 319
+ -> banfil(0x8061412, 0x80614C2, 0x8047DCC)
+ <- banfil = 57
+ -> convert(0x69, 0x8047DCC, 0x2)
+ <- convert = 319
+ -> banfil(0x8061419, 0x80614CA, 0x8047DCC)
+ <- banfil = 57
+ <- banner = 118
+ -> banprt(0x80614C2, 0x8047D38, 0xD27FB824)
+ <- banprt = 74
+
+The above output illustrates the flow of the program, which functions
+call which other functions.
+
+
+
+Now the same command is run with -d to display relative timestamps,
+
+ # dapptrace -dF banner hi
+
+ # # #
+ # # #
+ ###### #
+ # # #
+ # # #
+ # # #
+
+ RELATIVE CALL(args) = return
+ 2512 -> __fsr(0x2, 0x8047D7C, 0x8047D88)
+ 2516 <- __fsr = 122
+ 2518 -> main(0x2, 0x8047D7C, 0x8047D88)
+ 2863 -> banner(0x8047E3B, 0x80614C2, 0x8047D38)
+ 2865 -> banset(0x20, 0x80614C2, 0x8047DCC)
+ 2872 <- banset = 36
+ 2874 -> convert(0x68, 0x8047DCC, 0x2)
+ 2877 <- convert = 319
+ 2879 -> banfil(0x8061412, 0x80614C2, 0x8047DCC)
+ 2882 <- banfil = 57
+ 2883 -> convert(0x69, 0x8047DCC, 0x2)
+ 2885 <- convert = 319
+ 2886 -> banfil(0x8061419, 0x80614CA, 0x8047DCC)
+ 2888 <- banfil = 57
+ 2890 <- banner = 118
+ 2892 -> banprt(0x80614C2, 0x8047D38, 0xD27FB824)
+ 3214 <- banprt = 74
+
+The relative times are in microseconds since the program's invocation. Great!
+
+
+
+Even better is if we use the -eo options, to print elapsed times and on-cpu
+times,
+
+ # dapptrace -eoF banner hi
+
+ # # #
+ # # #
+ ###### #
+ # # #
+ # # #
+ # # #
+
+ ELAPSD CPU CALL(args) = return
+ . . -> __fsr(0x2, 0x8047D7C, 0x8047D88)
+ 41 4 <- __fsr = 122
+ . . -> main(0x2, 0x8047D7C, 0x8047D88)
+ . . -> banner(0x8047E3B, 0x80614C2, 0x8047D38)
+ . . -> banset(0x20, 0x80614C2, 0x8047DCC)
+ 29 6 <- banset = 36
+ . . -> convert(0x68, 0x8047DCC, 0x2)
+ 26 3 <- convert = 319
+ . . -> banfil(0x8061412, 0x80614C2, 0x8047DCC)
+ 25 2 <- banfil = 57
+ . . -> convert(0x69, 0x8047DCC, 0x2)
+ 23 1 <- convert = 319
+ . . -> banfil(0x8061419, 0x80614CA, 0x8047DCC)
+ 23 1 <- banfil = 57
+ 309 28 <- banner = 118
+ . . -> banprt(0x80614C2, 0x8047D38, 0xD27FB824)
+ 349 322 <- banprt = 74
+
+Now it is easy to see which functions take the longest (elapsed), and
+which consume the most CPU cycles.
+
+
+
+The following demonstrates the -U option, to trace all libraries,
+
+ # dapptrace -U banner hi
+
+ # # #
+ # # #
+ ###### #
+ # # #
+ # # #
+ # # #
+
+ CALL(args) = return
+ -> ld.so.1:_rt_boot(0x8047E34, 0x8047E3B, 0x0)
+ -> ld.so.1:_setup(0x8047D38, 0x20AE4, 0x3)
+ -> ld.so.1:setup(0x8047D88, 0x8047DCC, 0x0)
+ -> ld.so.1:fmap_setup(0x0, 0xD27FB2E4, 0xD27FB824)
+ <- ld.so.1:fmap_setup = 125
+ -> ld.so.1:addfree(0xD27FD3C0, 0xC40, 0x0)
+ <- ld.so.1:addfree = 65
+ -> ld.so.1:security(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF)
+ <- ld.so.1:security = 142
+ -> ld.so.1:readenv_user(0x8047D88, 0xD27FB204, 0xD27FB220)
+ -> ld.so.1:ld_str_env(0x8047E3E, 0xD27FB204, 0xD27FB220)
+ <- ld.so.1:ld_str_env = 389
+ -> ld.so.1:ld_str_env(0x8047E45, 0xD27FB204, 0xD27FB220)
+ <- ld.so.1:ld_str_env = 389
+ -> ld.so.1:ld_str_env(0x8047E49, 0xD27FB204, 0xD27FB220)
+ <- ld.so.1:ld_str_env = 389
+ -> ld.so.1:ld_str_env(0x8047E50, 0xD27FB204, 0xD27FB220)
+ -> ld.so.1:strncmp(0x8047E53, 0xD27F7BEB, 0x4)
+ <- ld.so.1:strncmp = 113
+ -> ld.so.1:rd_event(0xD27FB1F8, 0x3, 0x0)
+ [...4486 lines deleted...]
+ -> ld.so.1:_lwp_mutex_unlock(0xD27FD380, 0xD27FB824, 0x8047C04)
+ <- ld.so.1:_lwp_mutex_unlock = 47
+ <- ld.so.1:rt_mutex_unlock = 34
+ -> ld.so.1:rt_bind_clear(0x1, 0xD279ECC0, 0xD27FDB2C)
+ <- ld.so.1:rt_bind_clear = 34
+ <- ld.so.1:leave = 210
+ <- ld.so.1:elf_bndr = 803
+ <- ld.so.1:elf_rtbndr = 35
+
+The output was huge, around 4500 lines long. Function names are prefixed
+with their library name, eg "ld.so.1".
+
+This full output should be used with caution, as it enables so many probes
+it could well be a burden on the system.
+
diff --git a/Examples/dexplorer_example.txt b/Examples/dexplorer_example.txt
new file mode 100644
index 000000000000..cba6171c350e
--- /dev/null
+++ b/Examples/dexplorer_example.txt
@@ -0,0 +1,95 @@
+The following is a demonstration of the dexplorer program.
+
+
+Here we run dexplorer with no arguments. By default it will sample various
+system activities using DTrace at 5 seconds per sample. It creates an
+output tar.gz file containing all the DTrace output,
+
+ # dexplorer
+ Output dir will be the current dir (/export/home/root/DTrace/Dexplorer).
+ Hit enter for yes, or type path:
+ Starting dexplorer ver 0.70.
+ Sample interval is 5 seconds. Total run is > 100 seconds.
+ 0% Interrupts by CPU...
+ 5% Interrupt counts...
+ 10% Dispatcher queue length by CPU...
+ 15% Sdt counts...
+ 20% Pages paged in by process name...
+ 25% Files opened count...
+ 30% Disk I/O size distribution by process name...
+ 35% Minor faults by process name...
+ 40% Vminfo data by process name...
+ 45% Mib data by mib statistic...
+ 50% TCP write bytes by process...
+ 55% Sample process @ 1000 Hz...
+ 60% Syscall count by process name...
+ 65% Syscall count by syscall...
+ 70% Read bytes by process name...
+ 75% Write bytes by process name...
+ 80% Sysinfo counts by process name...
+ 85% New process counts with arguments...
+ 90% Signal counts...
+ 95% Syscall error counts...
+ 100% Done.
+ File is de_jupiter_200506271803.tar.gz
+
+As each sample is taken, a line of output is printed above. The above example
+is for version 0.70, newer versions of dexplorer are likely to print more
+lines as they take more samples.
+
+The final line states which file all the output is now in.
+
+
+
+
+The following displays the contents of a dexplorer file,
+
+ # gunzip de_jupiter_200506271803.tar.gz
+ # tar xf de_jupiter_200506271803.tar
+ de_jupiter_200506271803
+ de_jupiter_200506271803/Cpu
+ de_jupiter_200506271803/Cpu/interrupt_by_cpu
+ de_jupiter_200506271803/Cpu/interrupt_time
+ de_jupiter_200506271803/Cpu/dispqlen_by_cpu
+ de_jupiter_200506271803/Cpu/sdt_count
+ de_jupiter_200506271803/Disk
+ de_jupiter_200506271803/Disk/pgpgin_by_processname
+ de_jupiter_200506271803/Disk/fileopen_count
+ de_jupiter_200506271803/Disk/sizedist_by_processname
+ de_jupiter_200506271803/Mem
+ de_jupiter_200506271803/Mem/minf_by_processname
+ de_jupiter_200506271803/Mem/vminfo_by_processname
+ de_jupiter_200506271803/Net
+ de_jupiter_200506271803/Net/mib_data
+ de_jupiter_200506271803/Net/tcpw_by_process
+ de_jupiter_200506271803/Proc
+ de_jupiter_200506271803/Proc/sample_process
+ de_jupiter_200506271803/Proc/syscall_by_processname
+ de_jupiter_200506271803/Proc/syscall_count
+ de_jupiter_200506271803/Proc/readb_by_processname
+ de_jupiter_200506271803/Proc/writeb_by_processname
+ de_jupiter_200506271803/Proc/sysinfo_by_processname
+ de_jupiter_200506271803/Proc/newprocess_count
+ de_jupiter_200506271803/Proc/signal_count
+ de_jupiter_200506271803/Proc/syscall_errors
+ de_jupiter_200506271803/Info
+ de_jupiter_200506271803/Info/uname-a
+ de_jupiter_200506271803/Info/psrinfo-v
+ de_jupiter_200506271803/Info/prtconf
+ de_jupiter_200506271803/Info/df-k
+ de_jupiter_200506271803/Info/ifconfig-a
+ de_jupiter_200506271803/Info/ps-o
+ de_jupiter_200506271803/Info/uptime
+ de_jupiter_200506271803/log
+
+
+
+The following demonstrates running dexplorer in full quiet mode,
+
+ # dexplorer -qy -d /var/tmp
+ #
+
+No text is written to the screen (-qy). The output file will have been
+put in /var/tmp (-d).
+
+
diff --git a/Examples/diskhits_example.txt b/Examples/diskhits_example.txt
new file mode 100644
index 000000000000..6fe3a859a972
--- /dev/null
+++ b/Examples/diskhits_example.txt
@@ -0,0 +1,107 @@
+The following is a demonstration of the diskhits command.
+
+
+Here we run diskhits on a large file, /extra1/contents with is 46 Mb, and
+currently hasn't been accessed (so isn't in any cache).
+
+While diskhits is running, the file is grep'd in another window. This causes
+the entire file to be read,
+
+ # ./diskhits /extra1/contents
+ Tracing... Hit Ctrl-C to end.
+ ^C
+ Location (KB),
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@ 47
+ 2303 |@@ 41
+ 4606 |@@ 41
+ 6909 |@@ 42
+ 9212 |@@ 41
+ 11515 |@@ 41
+ 13818 |@@ 42
+ 16121 |@@ 43
+ 18424 |@@ 42
+ 20727 |@@ 41
+ 23030 |@@ 41
+ 25333 |@@ 41
+ 27636 |@@ 41
+ 29939 |@@ 42
+ 32242 |@@ 44
+ 34545 |@@ 41
+ 36848 |@@ 41
+ 39151 |@@ 41
+ 41454 |@@ 41
+ 43757 |@@ 40
+ >= 46060 | 0
+
+ Size (KB),
+
+ value ------------- Distribution ------------- count
+ 4 | 0
+ 8 | 6
+ 16 | 10
+ 32 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 818
+ 64 | 0
+
+ Total RW: 46064 KB
+
+Ok, so the file was read evently with each access around 32 to 63 Kb in size,
+and a total of 46 Mb read. This all makes sense, as it is reading the file
+for the first time.
+
+
+
+Now the same file is grep'd with diskhits running, this time we can see what
+effect caching the file has made,
+
+ # ./diskhits /extra1/contents
+ Tracing... Hit Ctrl-C to end.
+ ^C
+ Location (KB),
+
+ value ------------- Distribution ------------- count
+ 2303 | 0
+ 4606 | 5
+ 6909 |@ 67
+ 9212 |@@@@ 170
+ 11515 |@@@@@ 216
+ 13818 |@@@@@ 224
+ 16121 |@@@@@@ 287
+ 18424 |@@@@@ 227
+ 20727 |@@@ 144
+ 23030 |@@ 75
+ 25333 |@ 59
+ 27636 |@ 42
+ 29939 |@ 41
+ 32242 |@ 44
+ 34545 |@ 41
+ 36848 |@ 41
+ 39151 |@ 41
+ 41454 |@ 41
+ 43757 |@ 39
+ >= 46060 | 0
+
+ Size (KB),
+
+ value ------------- Distribution ------------- count
+ 2 | 0
+ 4 |@@@@@@@@@@@@@@@@@@@@@@@@@ 1137
+ 8 |@@@@@ 211
+ 16 |@@ 111
+ 32 |@@@@@@@@ 345
+ 64 | 0
+
+ Total RW: 29392 KB
+
+The difference is dramatic. This time only 29 Mb is read, leaving around
+17 Mb that was read from the cache. The way the file is read differs -
+in the later half of the file it looks the same, but in the first half there
+are many more events; oddly enough, this is because the early part of the
+file is cached more, the extra events are likely to be much smaller in size -
+as indicated in the difference in the size distribution.
+
+It appears that everything less that 4606 Kb has remained in the cache, with
+zero hits for that range.
+
diff --git a/Examples/dispqlen_example.txt b/Examples/dispqlen_example.txt
new file mode 100644
index 000000000000..f3542c00ea82
--- /dev/null
+++ b/Examples/dispqlen_example.txt
@@ -0,0 +1,62 @@
+This is a demonstration of the dispqlen.d script,
+
+
+Here we run it on a single CPU desktop,
+
+ # dispqlen.d
+ Sampling... Hit Ctrl-C to end.
+ ^C
+ CPU 0
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1790
+ 1 |@@@ 160
+ 2 | 10
+ 3 | 0
+
+The output shows the length of the dispatcher queue is mostly 0. This is
+evidence that the CPU is not very saturated. It does not indicate that the
+CPU is idle - as we are measuring the length of the queue, not what is
+on the CPU.
+
+
+
+Here it is run on a multi CPU server,
+
+ # dispqlen.d
+ Sampling... Hit Ctrl-C to end.
+ ^C
+ CPU 1
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1573
+ 1 |@@@@@@@@@ 436
+ 2 | 4
+ 3 | 0
+
+ CPU 4
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@@@@@@@ 1100
+ 1 |@@@@@@@@@@@@@@@@@@ 912
+ 2 | 1
+ 3 | 0
+
+ CPU 0
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@@ 846
+ 1 |@@@@@@@@@@@@@@@@@@@@@@@ 1167
+ 2 | 0
+
+ CPU 5
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@ 397
+ 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1537
+ 2 |@@ 79
+ 3 | 0
+
+The above output shows that threads are queueing up on CPU 5 much more than
+CPU 0.
+
diff --git a/Examples/dnlcps_example.txt b/Examples/dnlcps_example.txt
new file mode 100644
index 000000000000..eed35b41f70a
--- /dev/null
+++ b/Examples/dnlcps_example.txt
@@ -0,0 +1,47 @@
+The following is a demonstration of the dnlcps.d script.
+
+
+Here we run dnlcps.d for o few seconds, then hit Ctrl-C,
+
+ # dnlcps.d
+ Tracing... Hit Ctrl-C to end.
+ ^C
+ CMD: bash PID: 12508
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@ 2
+ >= 1 |@@@@@@@@@@@@@@@@@@@@@@@@ 3
+
+ CMD: nscd PID: 109
+
+ value ------------- Distribution ------------- count
+ 0 | 0
+ >= 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4
+
+ CMD: in.routed PID: 143
+
+ value ------------- Distribution ------------- count
+ 0 | 0
+ >= 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 12
+
+ CMD: ls PID: 12508
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@ 2
+ >= 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 22
+
+ CMD: find PID: 12507
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@ 5768
+ >= 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@ 11263
+
+A "find" command was running at the time, which had 11,263 hits on the DNLC
+and 5768 misses. An "ls" command scored 22 hits.
+
+The above distribution output can help us identify if procesess
+are both using the DNLC a lot, and what hit rate they are scoring.
+
diff --git a/Examples/dnlcsnoop_example.txt b/Examples/dnlcsnoop_example.txt
new file mode 100644
index 000000000000..45915f1088b4
--- /dev/null
+++ b/Examples/dnlcsnoop_example.txt
@@ -0,0 +1,88 @@
+The following is a demonstration of the dnlcsnoop.d script.
+
+
+Here we run dnlcsnoop.d, while in another window a "find /etc/default"
+command is executed,
+
+ # dnlcsnoop.d
+ PID CMD TIME HIT PATH
+ 9185 bash 9 Y /etc
+ 9185 bash 3 Y /etc
+ 12293 bash 9 Y /usr
+ 12293 bash 3 Y /usr/bin
+ 12293 bash 4 Y /usr/bin/find
+ 12293 bash 7 Y /lib
+ 12293 bash 3 Y /lib/ld.so.1
+ 12293 find 6 Y /usr
+ 12293 find 3 Y /usr/bin
+ 12293 find 3 Y /usr/bin/find
+ 12293 find 3 Y /usr
+ 12293 find 3 Y /usr/lib
+ 12293 find 3 Y /usr/lib/ld.so.1
+ 12293 find 3 Y /usr/lib/..
+ 12293 find 3 Y /usr/..
+ 12293 find 3 Y /lib
+ 12293 find 3 Y /lib/ld.so.1
+ 12293 find 3 Y /usr
+ 12293 find 3 Y /usr/bin
+ 12293 find 2 Y /usr/bin/find
+ 12293 find 4 Y /var
+ 12293 find 3 Y /var/ld
+ 12293 find 3 Y /var/ld/ld.config
+ 12293 find 3 Y /lib
+ 12293 find 3 Y /lib/libc.so.1
+ 12293 find 3 Y /lib
+ 12293 find 3 Y /lib/libc.so.1
+ 12293 find 3 Y /lib
+ 12293 find 3 Y /lib/libc.so.1
+ 12293 find 8 Y /export
+ 12293 find 4 Y /export/home
+ 12293 find 3 Y /export/home/root
+ 12293 find 4 Y /export/home/root/CacheKit-0.93
+ 12293 find 3 Y /export
+ 12293 find 3 Y /export/home
+ 12293 find 3 Y /export/home/root
+ 12293 find 3 Y /export/home/root/CacheKit-0.93
+ 12293 find 3 Y /etc
+ 12293 find 3 Y /etc/default
+ 12293 find 3 Y /etc
+ 12293 find 3 Y /etc/default
+ 12293 find 5 N /etc/default/cron
+ 12293 find 3 N /etc/default/devfsadm
+ 12293 find 4 N /etc/default/fs
+ 12293 find 4 N /etc/default/kbd
+ 12293 find 3 N /etc/default/keyserv
+ 12293 find 4 N /etc/default/nss
+ 12293 find 3 N /etc/default/syslogd
+ 12293 find 3 N /etc/default/tar
+ 12293 find 4 N /etc/default/utmpd
+ 12293 find 5 N /etc/default/init
+ 12293 find 4 Y /etc/default/login
+ 12293 find 4 Y /etc/default/su
+ 12293 find 3 N /etc/default/passwd
+ 12293 find 3 N /etc/default/dhcpagent
+ 12293 find 4 N /etc/default/inetinit
+ 12293 find 3 N /etc/default/ipsec
+ 12293 find 3 N /etc/default/mpathd
+ 12293 find 3 N /etc/default/telnetd
+ 12293 find 3 Y /etc/default/nfs
+ 12293 find 3 N /etc/default/autofs
+ 12293 find 9 Y /etc/default/ftp
+ 12293 find 5 N /etc/default/rpc.nisd
+ 12293 find 5 N /etc/default/nfslogd
+ 12293 find 4 N /etc/default/lu
+ 12293 find 6 N /etc/default/power
+ 12293 find 5 N /etc/default/sys-suspend
+ 12293 find 6 N /etc/default/metassist.xml
+ 12293 find 5 N /etc/default/yppasswdd
+ 12293 find 4 N /etc/default/webconsole
+ 12293 find 5 Y /export
+ 12293 find 4 Y /export/home
+ 12293 find 4 Y /export/home/root
+ 12293 find 4 Y /export/home/root/CacheKit-0.93
+
+The DNLC is the Directory Name Lookup Cache. Here we can see name lookups,
+and whether the cache returned a hit. "/export/home/root/CacheKit-0.93" was
+looked up a few times - this was the current directory that the find
+command was executed from.
+
diff --git a/Examples/dnlcstat_example.txt b/Examples/dnlcstat_example.txt
new file mode 100644
index 000000000000..a6ce1d6ec3d5
--- /dev/null
+++ b/Examples/dnlcstat_example.txt
@@ -0,0 +1,40 @@
+The following is a demonstration of the dnlcstat command.
+
+
+Here we run dnlcstat with no options. It prints a line every second,
+
+ # dnlcstat
+ dnlc %hit hit miss
+ 0 0 0
+ 0 0 0
+ 93 95 7
+ 89 1920 231
+ 89 2130 243
+ 91 2358 232
+ 92 1476 124
+ 92 1953 159
+ 94 2416 134
+ 94 1962 114
+ 95 2113 101
+ 97 1969 54
+ 98 1489 26
+ 41 564 786
+ 40 622 913
+ 35 520 952
+ 27 937 2503
+ 22 1696 5806
+ 22 955 3281
+ 21 1377 5059
+ 31 2043 4516
+ 22 1423 4968
+ 13 550 3438
+ 2 95 3810
+ 0 58 6410
+ 4 223 4433
+ 4 198 4491
+ 7 339 4383
+
+In another window, a "find /" was run. We can see the DNLC activity above,
+initially there are high hit rates in the DNLC - over 90%. Eventually
+the find command exhausts the DNLC, and the hit rate drops to below 10%.
+
diff --git a/Examples/dtruss_example.txt b/Examples/dtruss_example.txt
new file mode 100644
index 000000000000..107fc1978426
--- /dev/null
+++ b/Examples/dtruss_example.txt
@@ -0,0 +1,120 @@
+The following demonstrates the dtruss command - a DTrace version of truss.
+This version is designed to be less intrusive and safer than running truss.
+
+dtruss has many options. Here is the help for version 0.70,
+
+ USAGE: dtruss [-acdefholL] [-t syscall] { -p PID | -n name | command }
+
+ -p PID # examine this PID
+ -n name # examine this process name
+ -t syscall # examine this syscall only
+ -a # print all details
+ -c # print syscall counts
+ -d # print relative times (us)
+ -e # print elapsed times (us)
+ -f # follow children
+ -l # force printing pid/lwpid
+ -o # print on cpu times
+ -L # don't print pid/lwpid
+ -b bufsize # dynamic variable buf size
+ eg,
+ dtruss df -h # run and examine "df -h"
+ dtruss -p 1871 # examine PID 1871
+ dtruss -n tar # examine all processes called "tar"
+ dtruss -f test.sh # run test.sh and follow children
+
+
+
+For example, here we dtruss any process with the name "ksh" - the Korn shell,
+
+ # dtruss -n ksh
+ PID/LWP SYSCALL(args) = return
+ 27547/1: llseek(0x3F, 0xE4E, 0x0) = 3662 0
+ 27547/1: read(0x3F, "\0", 0x400) = 0 0
+ 27547/1: llseek(0x3F, 0x0, 0x0) = 3662 0
+ 27547/1: write(0x3F, "ls -l\n\0", 0x8) = 8 0
+ 27547/1: fdsync(0x3F, 0x10, 0xFEC1D444) = 0 0
+ 27547/1: lwp_sigmask(0x3, 0x20000, 0x0) = 0xFFBFFEFF 0
+ 27547/1: stat64("/usr/bin/ls\0", 0x8047A00, 0xFEC1D444) = 0 0
+ 27547/1: lwp_sigmask(0x3, 0x0, 0x0) = 0xFFBFFEFF 0
+ [...]
+
+The output for each system call does not yet evaluate as much as truss does.
+
+
+
+In the following example, syscall elapsed and overhead times are measured.
+Elapsed times represent the time from syscall start to finish; overhead
+times measure the time spent on the CPU,
+
+ # dtruss -eon bash
+ PID/LWP ELAPSD CPU SYSCALL(args) = return
+ 3911/1: 41 26 write(0x2, "l\0", 0x1) = 1 0
+ 3911/1: 1001579 43 read(0x0, "s\0", 0x1) = 1 0
+ 3911/1: 38 26 write(0x2, "s\0", 0x1) = 1 0
+ 3911/1: 1019129 43 read(0x0, " \001\0", 0x1) = 1 0
+ 3911/1: 38 26 write(0x2, " \0", 0x1) = 1 0
+ 3911/1: 998533 43 read(0x0, "-\0", 0x1) = 1 0
+ 3911/1: 38 26 write(0x2, "-\001\0", 0x1) = 1 0
+ 3911/1: 1094323 42 read(0x0, "l\0", 0x1) = 1 0
+ 3911/1: 39 27 write(0x2, "l\001\0", 0x1) = 1 0
+ 3911/1: 1210496 44 read(0x0, "\r\0", 0x1) = 1 0
+ 3911/1: 40 28 write(0x2, "\n\001\0", 0x1) = 1 0
+ 3911/1: 9 1 lwp_sigmask(0x3, 0x2, 0x0) = 0xFFBFFEFF 0
+ 3911/1: 70 63 ioctl(0x0, 0x540F, 0x80F6D00) = 0 0
+
+A bash command was in another window, where the "ls -l" command was being
+typed. The keystrokes can be seen above, along with the long elapsed times
+(keystroke delays), and short overhead times (as the bash process blocks
+on the read and leaves the CPU).
+
+
+
+Now dtruss is put to the test. Here we truss a test program that runs several
+hundred smaller programs, which in turn generate thousands of system calls.
+
+First, as a "control" we run the program without a truss or dtruss running,
+
+ # time ./test
+ real 0m38.508s
+ user 0m5.299s
+ sys 0m25.668s
+
+Now we try truss,
+
+ # time truss ./test 2> /dev/null
+ real 0m41.281s
+ user 0m0.558s
+ sys 0m1.351s
+
+Now we try dtruss,
+
+ # time dtruss ./test 2> /dev/null
+ real 0m46.226s
+ user 0m6.771s
+ sys 0m31.703s
+
+In the above test, truss slowed the program from 38 seconds to 41. dtruss
+slowed the program from 38 seconds to 46, slightly slower that truss...
+
+Now we try follow mode "-f". The test program does run several hundred
+smaller programs, so now there are plenty more system calls to track,
+
+ # time truss -f ./test 2> /dev/null
+ real 2m28.317s
+ user 0m0.893s
+ sys 0m3.527s
+
+Now we try dtruss,
+
+ # time dtruss -f ./test 2> /dev/null
+ real 0m56.179s
+ user 0m10.040s
+ sys 0m38.185s
+
+Wow, the difference is huge! truss slows the program from 38 to 148 seconds;
+but dtruss has only slowed the program from 38 to 56 seconds.
+
+
+
+
diff --git a/Examples/dvmstat_example.txt b/Examples/dvmstat_example.txt
new file mode 100644
index 000000000000..1fb7fbb739d1
--- /dev/null
+++ b/Examples/dvmstat_example.txt
@@ -0,0 +1,91 @@
+The following is a demonstration of the dvmstat program,
+
+
+Here we run dvmstat to monitor all processes called "find". In another
+window, a "find /" command is run,
+
+ # dvmstat -n find
+ re maj mf fr epi epo api apo fpi fpo sy
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 6336 0 372 0 0 0 0 0 0 0 22255
+ 1624 0 0 0 0 0 0 0 0 0 5497
+ 2292 0 0 0 0 0 0 0 0 0 7715
+ 13064 0 0 0 0 0 0 0 0 0 43998
+ 7972 168 0 0 0 0 0 0 168 0 38361
+ 468 636 0 0 0 0 0 0 636 0 13774
+ 376 588 0 0 0 0 0 0 588 0 10723
+ 80 636 0 0 0 0 0 0 656 0 11078
+ 48 772 0 0 0 0 0 0 812 0 9841
+ 16 1028 0 0 0 0 0 0 1056 0 10752
+ 0 1712 0 0 0 0 0 0 1740 0 12176
+ 4 1224 0 0 0 0 0 0 1236 0 9024
+
+The output above is spectacular! When the find command is first run,
+it begins be reading data from the file cache, as indicated by the "re"
+reclaims, and a lack of "fpi" filesystem page ins.
+
+Eventually the find command travels to places which are not cached, we can
+see the "re" value drops, and both the "maj" major faults and "fpi" values
+increase. This transition from cache hits to file system activity is
+very clear from the above output.
+
+
+
+Here we run a dvmstat to examine the PID 3778,
+
+ # dvmstat -p 3778
+ re maj mf fr epi epo api apo fpi fpo sy
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 24 28 0 0 0 0 0 0 28 0 109
+ 4 148 16 0 0 0 0 0 148 0 1883
+ 16 412 384 0 0 0 0 0 412 0 21019
+ 0 0 0 0 0 0 0 0 0 0 3
+ 0 0 0 0 0 0 0 0 0 0 221
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 84
+ 0 0 0 0 0 0 0 0 0 0 0
+
+Here we can see the statistics for that process only.
+
+
+
+The following runs the date command through dvmstat,
+
+ # dvmstat date
+ Sun Jun 12 17:44:24 EST 2005
+ re maj mf fr epi epo api apo fpi fpo sy
+ 16 0 208 0 0 0 0 0 0 0 38
+
+The values above are for the date command only.
+
+
+
+Now we run dvmstat on a tar command. Here we tar around 50Mb of files,
+so the command takes around 20 seconds to complete,
+
+ # dvmstat tar cf backup.tar DTrace
+ re maj mf fr epi epo api apo fpi fpo sy
+ 20 256 304 0 8 0 0 0 352 0 621
+ 4540 56 896 0 0 0 0 0 4636 0 1005
+ 4432 12 644 0 0 0 0 0 4384 0 906
+ 680 180 136 0 8 0 0 0 1056 0 502
+ 2328 60 468 0 0 0 0 0 2296 0 592
+ 1300 380 272 0 0 0 0 0 1704 0 1095
+ 2816 72 560 0 0 0 0 0 2940 0 709
+ 4084 40 416 0 0 0 0 0 4220 0 894
+ 2764 4 276 0 0 0 0 0 2700 0 566
+ 1824 96 328 0 0 0 0 0 2072 0 556
+ 3408 80 392 0 20 0 0 0 3496 0 857
+ 2804 92 552 0 4 0 0 0 2924 0 741
+ 1344 16 272 0 0 0 0 0 1376 0 289
+ 3284 52 520 0 12 0 0 0 3260 0 743
+ 4832 200 812 0 0 0 0 0 5292 0 1276
+ 11052 56 2200 0 0 0 0 0 8676 0 2326
+ 5256 328 1020 0 8 0 0 0 4404 0 1725
+ re maj mf fr epi epo api apo fpi fpo sy
+ 404 340 72 0 64 0 0 0 536 0 1135
+
+Great! Activity from the tar command such as "fpi"s can be clearly seen.
+
diff --git a/Examples/errinfo_example.txt b/Examples/errinfo_example.txt
new file mode 100644
index 000000000000..1dcb28d29db9
--- /dev/null
+++ b/Examples/errinfo_example.txt
@@ -0,0 +1,90 @@
+This is an example of the errinfo program, which prints details on syscall
+failures.
+
+By default it "snoops" syscall failures and prints their details,
+
+ # ./errinfo
+ EXEC SYSCALL ERR DESC
+ wnck-applet read 11 Resource temporarily unavailable
+ Xorg read 11 Resource temporarily unavailable
+ nautilus read 11 Resource temporarily unavailable
+ Xorg read 11 Resource temporarily unavailable
+ dsdm read 11 Resource temporarily unavailable
+ Xorg read 11 Resource temporarily unavailable
+ Xorg pollsys 4 interrupted system call
+ mozilla-bin lwp_park 62 timer expired
+ gnome-netstatus- ioctl 12 Not enough core
+ mozilla-bin lwp_park 62 timer expired
+ Xorg read 11 Resource temporarily unavailable
+ mozilla-bin lwp_park 62 timer expired
+ [...]
+
+which is useful to see these events live, but can scroll off the screen
+somewhat rapidly.. so,
+
+
+
+The "-c" option will count the number of errors. Hit Ctrl-C to stop the
+sample. For example,
+
+# ./errinfo -c
+Tracing... Hit Ctrl-C to end.
+^C
+ EXEC SYSCALL ERR COUNT DESC
+ nscd fcntl 22 1 Invalid argument
+ xscreensaver read 11 1 Resource temporarily unavailable
+ inetd lwp_park 62 1 timer expired
+ svc.startd lwp_park 62 1 timer expired
+ svc.configd lwp_park 62 1 timer expired
+ ttymon ioctl 25 1 Inappropriate ioctl for device
+gnome-netstatus- ioctl 12 2 Not enough core
+ mozilla-bin lwp_kill 3 2 No such process
+ mozilla-bin connect 150 5 operation now in progress
+ svc.startd portfs 62 8 timer expired
+ java_vm lwp_cond_wait 62 8 timer expired
+ soffice.bin read 11 9 Resource temporarily unavailable
+ gnome-terminal read 11 23 Resource temporarily unavailable
+ mozilla-bin recv 11 26 Resource temporarily unavailable
+ nautilus read 11 26 Resource temporarily unavailable
+gnome-settings-d read 11 26 Resource temporarily unavailable
+ gnome-smproxy read 11 34 Resource temporarily unavailable
+ gnome-panel read 11 42 Resource temporarily unavailable
+ dsdm read 11 112 Resource temporarily unavailable
+ metacity read 11 128 Resource temporarily unavailable
+ mozilla-bin lwp_park 62 133 timer expired
+ Xorg pollsys 4 147 interrupted system call
+ wnck-applet read 11 179 Resource temporarily unavailable
+ mozilla-bin read 11 258 Resource temporarily unavailable
+ Xorg read 11 1707 Resource temporarily unavailable
+
+Ok, so Xorg has received 1707 of the same type of error for the syscall read().
+
+
+
+The "-n" option lets us match on one type of process only. In the following
+we match processes that have the name "mozilla-bin",
+
+# ./errinfo -c -n mozilla-bin
+Tracing... Hit Ctrl-C to end.
+^C
+ EXEC SYSCALL ERR COUNT DESC
+ mozilla-bin getpeername 134 1 Socket is not connected
+ mozilla-bin recv 11 2 Resource temporarily unavailable
+ mozilla-bin lwp_kill 3 2 No such process
+ mozilla-bin connect 150 5 operation now in progress
+ mozilla-bin lwp_park 62 207 timer expired
+ mozilla-bin read 11 396 Resource temporarily unavailable
+
+
+
+The "-p" option lets us examine one PID only. The following example examines
+PID 1119,
+
+# ./errinfo -c -p 1119
+Tracing... Hit Ctrl-C to end.
+^C
+ EXEC SYSCALL ERR COUNT DESC
+ Xorg pollsys 4 47 interrupted system call
+ Xorg read 11 669 Resource temporarily unavailable
+
+
diff --git a/Examples/execsnoop_example.txt b/Examples/execsnoop_example.txt
new file mode 100644
index 000000000000..e55682a9e64a
--- /dev/null
+++ b/Examples/execsnoop_example.txt
@@ -0,0 +1,78 @@
+The following is an example of execsnoop. As processes are executed their
+details are printed out. Another user was logged in running a few commands
+which can be viewed below,
+
+ # ./execsnoop
+ UID PID PPID ARGS
+ 100 3008 2656 ls
+ 100 3009 2656 ls -l
+ 100 3010 2656 cat /etc/passwd
+ 100 3011 2656 vi /etc/hosts
+ 100 3012 2656 date
+ 100 3013 2656 ls -l
+ 100 3014 2656 ls
+ 100 3015 2656 finger
+ [...]
+
+
+
+In this example the command "man gzip" was executed. The output lets us
+see what the man command is actually doing,
+
+ # ./execsnoop
+ UID PID PPID ARGS
+ 100 3064 2656 man gzip
+ 100 3065 3064 sh -c cd /usr/share/man; tbl /usr/share/man/man1/gzip.1 |nroff -u0 -Tlp -man -
+ 100 3067 3066 tbl /usr/share/man/man1/gzip.1
+ 100 3068 3066 nroff -u0 -Tlp -man -
+ 100 3066 3065 col -x
+ 100 3069 3064 sh -c trap '' 1 15; /usr/bin/mv -f /tmp/mpoMaa_f /usr/share/man/cat1/gzip.1 2>
+ 100 3070 3069 /usr/bin/mv -f /tmp/mpoMaa_f /usr/share/man/cat1/gzip.1
+ 100 3071 3064 sh -c more -s /tmp/mpoMaa_f
+ 100 3072 3071 more -s /tmp/mpoMaa_f
+ ^C
+
+
+
+Execsnoop has other options,
+
+ # ./execsnoop -h
+ USAGE: execsnoop [-a|-A|-sv] [-c command]
+ execsnoop # default output
+ -a # print all data
+ -A # dump all data, space delimited
+ -s # include start time, us
+ -v # include start time, string
+ -c command # command name to snoop
+
+
+
+In particular the verbose option for human readable timestamps is
+very useful,
+
+ # ./execsnoop -v
+ STRTIME UID PID PPID ARGS
+ 2005 Jan 22 00:07:22 0 23053 20933 date
+ 2005 Jan 22 00:07:24 0 23054 20933 uname -a
+ 2005 Jan 22 00:07:25 0 23055 20933 ls -latr
+ 2005 Jan 22 00:07:27 0 23056 20933 df -k
+ 2005 Jan 22 00:07:29 0 23057 20933 ps -ef
+ 2005 Jan 22 00:07:29 0 23057 20933 ps -ef
+ 2005 Jan 22 00:07:34 0 23058 20933 uptime
+ 2005 Jan 22 00:07:34 0 23058 20933 uptime
+ [...]
+
+
+
+It is also possible to match particular commands. Here we watch
+anyone using the vi command only,
+
+ # ./execsnoop -vc vi
+ STRTIME UID PID PPID ARGS
+ 2005 Jan 22 00:10:33 0 23063 20933 vi /etc/passwd
+ 2005 Jan 22 00:10:40 0 23064 20933 vi /etc/shadow
+ 2005 Jan 22 00:10:51 0 23065 20933 vi /etc/group
+ 2005 Jan 22 00:10:57 0 23066 20933 vi /.rhosts
+ [...]
+
+
diff --git a/Examples/fddist_example.txt b/Examples/fddist_example.txt
new file mode 100644
index 000000000000..3d943b9e0185
--- /dev/null
+++ b/Examples/fddist_example.txt
@@ -0,0 +1,38 @@
+The following is a demonstration of the fddist command,
+
+
+Here fddist is run for a few seconds on an idle workstation,
+
+ Tracing reads and writes... Hit Ctrl-C to end.
+ ^C
+ EXEC: dtrace PID: 3288
+
+ value ------------- Distribution ------------- count
+ 0 | 0
+ 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
+ 2 | 0
+
+ EXEC: mozilla-bin PID: 1659
+
+ value ------------- Distribution ------------- count
+ 3 | 0
+ 4 |@@@@@@@@@@ 28
+ 5 | 0
+ 6 |@@@@@@@@@@@@@@@ 40
+ 7 |@@@@@@@@@@@@@@@ 40
+ 8 | 0
+
+ EXEC: Xorg PID: 1532
+
+ value ------------- Distribution ------------- count
+ 22 | 0
+ 23 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 57
+ 24 | 0
+
+The above displays the usage pattern for process file descriptors.
+We can see the Xorg process (PID 1532) has made 57 reads or writes to
+it's file descriptor 23.
+
+The pfiles(1) command can be used to help determine what file
+descriptor 23 actually is.
+
diff --git a/Examples/filebyproc_example.txt b/Examples/filebyproc_example.txt
new file mode 100644
index 000000000000..8267da2fc083
--- /dev/null
+++ b/Examples/filebyproc_example.txt
@@ -0,0 +1,27 @@
+The following is an example of the filebyproc.d script,
+
+ # filebyproc.d
+ dtrace: description 'syscall::open*:entry ' matched 2 probes
+ CPU ID FUNCTION:NAME
+ 0 14 open:entry gnome-netstatus- /dev/kstat
+ 0 14 open:entry man /var/ld/ld.config
+ 0 14 open:entry man /lib/libc.so.1
+ 0 14 open:entry man /usr/share/man/man.cf
+ 0 14 open:entry man /usr/share/man/windex
+ 0 14 open:entry man /usr/share/man/man1/ls.1
+ 0 14 open:entry man /usr/share/man/man1/ls.1
+ 0 14 open:entry man /tmp/mpqea4RF
+ 0 14 open:entry sh /var/ld/ld.config
+ 0 14 open:entry sh /lib/libc.so.1
+ 0 14 open:entry neqn /var/ld/ld.config
+ 0 14 open:entry neqn /lib/libc.so.1
+ 0 14 open:entry neqn /usr/share/lib/pub/eqnchar
+ 0 14 open:entry tbl /var/ld/ld.config
+ 0 14 open:entry tbl /lib/libc.so.1
+ 0 14 open:entry tbl /usr/share/man/man1/ls.1
+ 0 14 open:entry nroff /var/ld/ld.config
+ [...]
+
+In the above example, the command "man ls" was run. Each file that was
+attempted to be opened can be seen, along with the program name responsible.
+
diff --git a/Examples/fspaging_example.txt b/Examples/fspaging_example.txt
new file mode 100644
index 000000000000..c29cb086b832
--- /dev/null
+++ b/Examples/fspaging_example.txt
@@ -0,0 +1,32 @@
+The following is a short sample of output from the fspaging.d script.
+
+
+fspaging.d traces syscall read and writes, vnode interface reads, writes,
+getpage and putpage, and disk io.
+
+ # ./fspaging.d
+ Event Device RW Size Offset Path
+ disk_io dad1 R 1024 0 /extra1
+ disk_io dad1 R 8192 0 <none>
+ disk_io dad1 R 2048 0 <none>
+ sc-write . W 51200 0 /extra1/outfile
+ fop_write . W 51200 0 /extra1/outfile
+ fop_getpage . R 8192 0 /extra1/50k
+ disk_io dad1 R 8192 0 /extra1/50k
+ disk_ra dad1 R 8192 8 /extra1/50k
+ fop_getpage . R 8192 8 /extra1/50k
+ disk_ra dad1 R 34816 16 /extra1/50k
+ fop_getpage . R 8192 16 /extra1/50k
+ fop_getpage . R 8192 24 /extra1/50k
+ fop_getpage . R 8192 32 /extra1/50k
+ fop_getpage . R 8192 40 /extra1/50k
+ fop_getpage . R 8192 48 /extra1/50k
+ fop_putpage . W 8192 0 /extra1/outfile
+ fop_putpage . W 8192 8 /extra1/outfile
+ fop_putpage . W 8192 16 /extra1/outfile
+ fop_putpage . W 8192 24 /extra1/outfile
+ fop_putpage . W 8192 32 /extra1/outfile
+ fop_putpage . W 8192 40 /extra1/outfile
+ disk_io dad1 W 51200 0 /extra1/outfile
+
+For a full discussion of this example, see fsrw_example.txt.
diff --git a/Examples/fsrw_example.txt b/Examples/fsrw_example.txt
new file mode 100644
index 000000000000..b153303738ee
--- /dev/null
+++ b/Examples/fsrw_example.txt
@@ -0,0 +1,129 @@
+The following are demonstrations of the fsrw.d script.
+
+
+Here the fsrw.d script was running while a 50 Kbyte file was read,
+
+ # ./fsrw.d
+ Event Device RW Size Offset Path
+ sc-read . R 8192 0 /extra1/50k
+ fop_read . R 8192 0 /extra1/50k
+ disk_io cmdk0 R 8192 0 /extra1/50k
+ disk_ra cmdk0 R 8192 8 /extra1/50k
+ sc-read . R 8192 8 /extra1/50k
+ fop_read . R 8192 8 /extra1/50k
+ disk_ra cmdk0 R 34816 16 /extra1/50k
+ sc-read . R 8192 16 /extra1/50k
+ fop_read . R 8192 16 /extra1/50k
+ sc-read . R 8192 24 /extra1/50k
+ fop_read . R 8192 24 /extra1/50k
+ sc-read . R 8192 32 /extra1/50k
+ fop_read . R 8192 32 /extra1/50k
+ sc-read . R 8192 40 /extra1/50k
+ fop_read . R 8192 40 /extra1/50k
+ sc-read . R 8192 48 /extra1/50k
+ fop_read . R 8192 48 /extra1/50k
+ sc-read . R 8192 50 /extra1/50k
+ fop_read . R 8192 50 /extra1/50k
+ ^C
+
+By looking closely at the Offset (Kbytes) and Size of each transaction, we
+can see how the read() system calls (sc-read) were satisfied by the file
+system. There were 8 read() system calls, and 3 disk events - 2 of which were
+UFS read-ahead (disk_ra). The final read-ahead was for 34 Kbytes and began
+with an offset of 16 Kbytes, which read the remaining file data (34 + 16 = 50
+Kbytes). The subsequent read() system calls and corresponding fop_read() calls
+returned from the page cache.
+
+
+
+The following demonstrates how a logical I/O is broken up into multiple
+physical I/O events. Here a dd command was used to read 1 Mbytes from the
+/var/sadm/install/contents file while fsrw.d was tracing.
+
+ # ./fsrw.d
+ Event Device RW Size Offset Path
+ sc-read . R 1048576 0 /var/sadm/install/contents
+ fop_read . R 1048576 0 /var/sadm/install/contents
+ disk_ra cmdk0 R 4096 72 /var/sadm/install/contents
+ disk_ra cmdk0 R 8192 96 <none>
+ disk_ra cmdk0 R 57344 96 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 152 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 208 /var/sadm/install/contents
+ disk_ra cmdk0 R 49152 264 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 312 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 368 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 424 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 480 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 536 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 592 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 648 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 704 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 760 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 816 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 872 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 928 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 984 /var/sadm/install/contents
+ disk_ra cmdk0 R 57344 1040 /var/sadm/install/contents
+ ^C
+
+Both the read() syscall (sc-read) and the fop_read() call asked the file system
+for 1048576 bytes, which was then broken into numerous disk I/O events of up to
+56 Kbytes in size. The 8192 byte read with a path of "<none>" is likely to be
+the file system reading the indirect block pointers for the
+/var/sadm/install/contents file (something DTrace could confirm in detail).
+
+
+
+
+The following traces activity as a cp command copies a 50 Kbyte file.
+
+ # ./fsrw.d
+ Event Device RW Size Offset Path
+ disk_io dad1 R 1024 0 /extra1
+ disk_io dad1 R 8192 0 <none>
+ disk_io dad1 R 8192 0 <none>
+ disk_io dad1 R 2048 0 <none>
+ disk_io dad1 R 2048 0 <none>
+ sc-write . W 51200 0 /extra1/outfile
+ fop_write . W 51200 0 /extra1/outfile
+ disk_io dad1 R 8192 0 /extra1/50k
+ disk_ra dad1 R 8192 8 /extra1/50k
+ disk_ra dad1 R 34816 16 /extra1/50k
+ disk_io dad1 R 2048 0 <none>
+ disk_io dad1 W 49152 0 /extra1/outfile
+ ^C
+
+Reads including UFS read-ahead can be seen as the file is read.
+The output finishes with disk writes as the new file is flushed to disk.
+The syscall write() and fop_write() can be seen to the /extra1/outfile,
+however there is no syscall read() or fop_read() to /extra1/50k - which
+we may have expected to occur before the writes. This is due to the way
+the cp command now works, it uses mmap() to map files in for reading.
+This activity can be seen if we also trace fop_getpage() and fop_putpage(),
+as the fspaging.d dtrace script does.
+
+ # ./fspaging.d
+ Event Device RW Size Offset Path
+ disk_io dad1 R 1024 0 /extra1
+ disk_io dad1 R 8192 0 <none>
+ disk_io dad1 R 2048 0 <none>
+ sc-write . W 51200 0 /extra1/outfile
+ fop_write . W 51200 0 /extra1/outfile
+ fop_getpage . R 8192 0 /extra1/50k
+ disk_io dad1 R 8192 0 /extra1/50k
+ disk_ra dad1 R 8192 8 /extra1/50k
+ fop_getpage . R 8192 8 /extra1/50k
+ disk_ra dad1 R 34816 16 /extra1/50k
+ fop_getpage . R 8192 16 /extra1/50k
+ fop_getpage . R 8192 24 /extra1/50k
+ fop_getpage . R 8192 32 /extra1/50k
+ fop_getpage . R 8192 40 /extra1/50k
+ fop_getpage . R 8192 48 /extra1/50k
+ fop_putpage . W 8192 0 /extra1/outfile
+ fop_putpage . W 8192 8 /extra1/outfile
+ fop_putpage . W 8192 16 /extra1/outfile
+ fop_putpage . W 8192 24 /extra1/outfile
+ fop_putpage . W 8192 32 /extra1/outfile
+ fop_putpage . W 8192 40 /extra1/outfile
+ disk_io dad1 W 51200 0 /extra1/outfile
+
diff --git a/Examples/guess_example.txt b/Examples/guess_example.txt
new file mode 100644
index 000000000000..74be8b3a4d81
--- /dev/null
+++ b/Examples/guess_example.txt
@@ -0,0 +1,39 @@
+The following is a demonstration of the guess.d script,
+
+
+guess.d is a guessing game written in DTrace. It goes like this,
+
+ # ./guess.d
+ guess.d - Guess a number between 1 and 100
+
+ Enter guess 1: 50
+ Lower...
+ Enter guess 2: 25
+ Higher...
+ Enter guess 3: 37
+ Higher...
+ Enter guess 4: 44
+ Higher...
+ Enter guess 5: 48
+ Lower...
+ Enter guess 6: 46
+ Lower...
+ Enter guess 7: 45
+ Correct! That took 7 guesses.
+
+ Please enter your name: Brendan Gregg
+
+ Previous high scores,
+ Fred Nurk 7
+ Brendan Gregg 7
+
+It was written as a demonstration of the same code written in dozens of
+languages. It makes a good demonstration, as it covers integer and string
+variables, conditional statements, loops, keyboard input, screen output,
+and file input and output.
+
+Written in DTrace however, is not such a good demonstration! DTrace doesn't
+have loops (it doesn't really need them either) which made the code a
+little odd. DTrace also doesn't have keyboard input... So this script is
+somewhat amusing as an example, but not terribly useful.
+
diff --git a/Examples/hotkernel_example.txt b/Examples/hotkernel_example.txt
new file mode 100644
index 000000000000..d8a5aec0b98f
--- /dev/null
+++ b/Examples/hotkernel_example.txt
@@ -0,0 +1,153 @@
+The following are demonstrations of the hotkernel DTrace program.
+
+
+Here hotkernel is run for a couple of seconds then Ctrl-C is hit,
+
+ # ./hotkernel
+ Sampling... Hit Ctrl-C to end.
+ ^C
+ FUNCTION COUNT PCNT
+ unix`swtch 1 0.1%
+ pcplusmp`apic_redistribute_compute 1 0.1%
+ genunix`strrput 1 0.1%
+ unix`sys_call 1 0.1%
+ genunix`fsflush_do_pages 1 0.1%
+ TS`ts_wakeup 1 0.1%
+ genunix`callout_schedule_1 1 0.1%
+ unix`page_create_putback 1 0.1%
+ unix`mutex_enter 4 0.3%
+ unix`cpu_halt 1575 99.2%
+
+The output summarises which kernel-level function was sampled on the
+CPU the most. This report shows that unix`cpu_halt was sampled 1575
+times, which was 99.2% of the kernel-level samples.
+
+As it turns out, unix`cpu_halt is called on this x86 server as part of the
+kernel idle thread - explaining why it is so often found on the CPU,
+
+ # dtrace -n 'fbt::cpu_halt:entry { @[stack()] = count(); }'
+ dtrace: description 'fbt::cpu_halt:entry ' matched 1 probe
+ ^C
+
+ unix`idle+0x3b
+ unix`thread_start+0x3
+ 956
+
+This kernel stack trace indicates that cpu_halt() is called by idle().
+
+The following is a SPARC example,
+
+ # ./hotkernel
+ Sampling... Hit Ctrl-C to end.
+ ^C
+ FUNCTION COUNT PCNT
+ genunix`fop_ioctl 1 0.1%
+ genunix`allocb_cred 1 0.1%
+ genunix`poll_common 1 0.1%
+ genunix`cv_block 1 0.1%
+ genunix`strioctl 1 0.1%
+ genunix`disp_lock_exit 1 0.1%
+ genunix`crfree 1 0.1%
+ ufs`ufs_getpage 1 0.1%
+ SUNW,UltraSPARC-IIi`copyin 1 0.1%
+ genunix`strmakedata 1 0.1%
+ genunix`cv_waituntil_sig 1 0.1%
+ SUNW,UltraSPARC-IIi`prefetch_page_r 1 0.1%
+ unix`set_freemem 1 0.1%
+ unix`page_trylock 1 0.1%
+ genunix`anon_get_ptr 1 0.1%
+ unix`page_hashin 1 0.1%
+ genunix`bt_getlowbit 1 0.1%
+ unix`pp_load_tlb 1 0.1%
+ unix`_resume_from_idle 1 0.1%
+ unix`hat_pageunload 1 0.1%
+ genunix`strrput 1 0.1%
+ genunix`strpoll 1 0.1%
+ unix`page_do_hashin 1 0.1%
+ unix`cpu_vm_stats_ks_update 1 0.1%
+ genunix`sleepq_wakeone_chan 1 0.1%
+ unix`lock_set_spl 1 0.1%
+ tl`tl_wput 1 0.1%
+ genunix`kstrgetmsg 1 0.1%
+ genunix`qbackenable 1 0.1%
+ genunix`releasef 1 0.1%
+ genunix`callout_execute 1 0.1%
+ uata`ata_hba_start 1 0.1%
+ genunix`pcacheset_cmp 1 0.1%
+ genunix`sleepq_insert 1 0.1%
+ genunix`syscall_mstate 1 0.1%
+ sockfs`sotpi_recvmsg 1 0.1%
+ genunix`strput 1 0.1%
+ genunix`timespectohz 1 0.1%
+ unix`lock_clear_splx 1 0.1%
+ genunix`read 1 0.1%
+ genunix`as_segcompar 1 0.1%
+ unix`atomic_cas_64 1 0.1%
+ unix`mutex_exit 1 0.1%
+ genunix`cv_unsleep 1 0.1%
+ unix`putnext 1 0.1%
+ unix`intr_thread 1 0.1%
+ genunix`hrt2tv 1 0.1%
+ sockfs`socktpi_poll 1 0.1%
+ unix`sfmmu_mlspl_enter 1 0.1%
+ SUNW,UltraSPARC-IIi`get_ecache_tag 1 0.1%
+ SUNW,UltraSPARC-IIi`gethrestime 1 0.1%
+ genunix`cv_timedwait_sig 1 0.1%
+ genunix`getq_noenab 1 0.1%
+ SUNW,UltraSPARC-IIi`flushecacheline 1 0.1%
+ unix`utl0 1 0.1%
+ genunix`anon_alloc 1 0.1%
+ unix`page_downgrade 1 0.1%
+ unix`setfrontdq 1 0.1%
+ genunix`timeout_common 1 0.1%
+ unix`bzero 1 0.1%
+ unix`ktl0 2 0.1%
+ genunix`canputnext 2 0.1%
+ genunix`clear_active_fd 2 0.1%
+ unix`sfmmu_tlb_demap 2 0.1%
+ unix`page_vpadd 2 0.1%
+ SUNW,UltraSPARC-IIi`check_ecache_line 2 0.1%
+ genunix`cyclic_softint 2 0.1%
+ genunix`restore_mstate 2 0.1%
+ genunix`anon_map_getpages 2 0.1%
+ genunix`putq 2 0.1%
+ unix`page_lookup_create 2 0.1%
+ dtrace`dtrace_dynvar_clean 2 0.1%
+ unix`sfmmu_pageunload 2 0.1%
+ genunix`cpu_decay 2 0.1%
+ genunix`kmem_cache_alloc 3 0.2%
+ unix`rw_exit 3 0.2%
+ tl`tl_wput_data_ser 3 0.2%
+ unix`page_get_replacement_page 3 0.2%
+ unix`page_sub 3 0.2%
+ genunix`clock 3 0.2%
+ SUNW,UltraSPARC-IIi`copyout 3 0.2%
+ unix`mutex_enter 4 0.2%
+ genunix`pcache_poll 5 0.3%
+ SUNW,UltraSPARC-IIi`scrub_ecache_line 5 0.3%
+ SUNW,UltraSPARC-IIi`hwblkpagecopy 22 1.2%
+ SUNW,UltraSPARC-IIi`hwblkclr 39 2.1%
+ unix`generic_idle_cpu 506 26.8%
+ unix`idle 1199 63.5%
+
+Which shows the most common function is unix`idle.
+
+
+
+
+Now the hotkernel tool is demonstrated with the -m option, to only print
+out samples by module,
+
+ # ./hotkernel -m
+ Sampling... Hit Ctrl-C to end.
+ ^C
+ MODULE COUNT PCNT
+ usbms 1 0.0%
+ specfs 1 0.0%
+ uhci 1 0.0%
+ sockfs 2 0.0%
+ genunix 28 0.6%
+ unix 4539 99.3%
+
+Here, genunix and unix (the two core parts of the kernel) were the most
+common module to be executing on-CPU.
diff --git a/Examples/hotspot_example.txt b/Examples/hotspot_example.txt
new file mode 100644
index 000000000000..179ba8d0a18f
--- /dev/null
+++ b/Examples/hotspot_example.txt
@@ -0,0 +1,34 @@
+The following is a demonstration of the hotspot.d script.
+
+Here the script is run while a large file is copied from one filesystem
+(cmdk0 102,0) to another (cmdk0 102,3). We can see the file mostly resided
+around the 9000 to 10999 Mb range on the source disk (102,0), and was
+copied to the 0 to 999 Mb range on the target disk (102,3).
+
+ # ./hotspot.d
+ Tracing... Hit Ctrl-C to end.
+ ^C
+ Disk: cmdk0 Major,Minor: 102,3
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 418
+ 1000 | 0
+
+ Disk: cmdk0 Major,Minor: 102,0
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 | 1
+ 1000 | 5
+ 2000 | 0
+ 3000 | 0
+ 4000 | 0
+ 5000 | 0
+ 6000 | 0
+ 7000 | 0
+ 8000 | 0
+ 9000 |@@@@@ 171
+ 10000 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1157
+ 11000 | 0
+
diff --git a/Examples/hotuser_example.txt b/Examples/hotuser_example.txt
new file mode 100644
index 000000000000..c038acd6cda8
--- /dev/null
+++ b/Examples/hotuser_example.txt
@@ -0,0 +1,107 @@
+The following are demonstrations of the hotuser DTrace program.
+
+
+Here, hotuser is run on a test program called "dofuncs", which is hard coded
+to spend half its time in delta(), a third in beta() and a sixth in alpha().
+
+ # ./hotuser -c ./dofuncs
+ Sampling... Hit Ctrl-C to end.
+ ^C
+ FUNCTION COUNT PCNT
+ dofuncs`alpha 511 16.5%
+ dofuncs`beta 1029 33.3%
+ dofuncs`delta 1552 50.2%
+
+hotuser has accurately sampled which user-level functions are on the CPU,
+producing a report of the expected breakdown. The hottest user-level function
+is delta(), which was sampled 1552 times - 50.2% of the total samples.
+
+
+
+Now hotuser is run on gunzip, to find which functions are most often
+on the CPU,
+
+ # ./hotuser -c 'gunzip contents.gz'
+ Sampling... Hit Ctrl-C to end.
+
+ FUNCTION COUNT PCNT
+ libc.so.1`_free_unlocked 1 0.1%
+ gunzip`unzip 1 0.1%
+ ld.so.1`strcmp 1 0.1%
+ gunzip`inflate_dynamic 1 0.1%
+ libc.so.1`_write 1 0.1%
+ gunzip`write_buf 1 0.1%
+ gunzip`0x2d990 2 0.3%
+ libc.so.1`write 2 0.3%
+ gunzip`0x2d994 2 0.3%
+ ld.so.1`rtld_db_preinit 3 0.4%
+ gunzip`0x2d98c 7 0.9%
+ gunzip`huft_build 9 1.2%
+ libc_psr.so.1`memcpy 138 18.5%
+ gunzip`inflate_codes 233 31.2%
+ gunzip`updcrc 344 46.1%
+
+This shows that updcrc() was sampled 344 times, and 46.1% of the total
+samples.
+
+
+
+A -l option will provide a breakdown on libraries only. hotuser
+is run on gzip to show library usage only,
+
+ # ./hotuser -lc 'gzip contents'
+ Sampling... Hit Ctrl-C to end.
+
+ LIBRARY COUNT PCNT
+ libc.so.1 2 0.0%
+ libc_psr.so.1 37 0.9%
+ gzip 4113 99.1%
+
+This shows that code in the gzip binary itself was on the CPU 99.1% of
+the sample times, with libc_psr.so.1 code on the CPU 0.9% of the time.
+
+
+
+The following shows library usage of mozilla. The pgrep command is used to
+match the most recent PID of mozilla-bin.
+
+ # ./hotuser -lp `pgrep -n mozilla-bin`
+ Sampling... Hit Ctrl-C to end.
+ ^C
+ LIBRARY COUNT PCNT
+ libplds4.so 1 0.1%
+ libappcomps.so 1 0.1%
+ libi18n.so 1 0.1%
+ libuconv.so 1 0.1%
+ libpref.so 1 0.1%
+ libblueprint.so 1 0.1%
+ libz.so.1 2 0.2%
+ libcaps.so 2 0.2%
+ libXrender.so.1 2 0.2%
+ libimglib2.so 2 0.2%
+ libXft.so.2 3 0.3%
+ libCrun.so.1 3 0.3%
+ libdocshell.so 3 0.3%
+ libplc4.so 4 0.4%
+ libgtk-x11-2.0.so.0.400.9 5 0.5%
+ libjsd.so 5 0.5%
+ libX11.so.4 5 0.5%
+ libnecko.so 8 0.9%
+ libwidget_gtk2.so 9 1.0%
+ libgkgfx.so 13 1.4%
+ libglib-2.0.so.0.400.1 14 1.5%
+ libgfx_gtk.so 18 2.0%
+ libnspr4.so 20 2.2%
+ libxpconnect.so 22 2.4%
+ libgdk-x11-2.0.so.0.400.9 23 2.5%
+ libgobject-2.0.so.0.400.1 25 2.7%
+ libhtmlpars.so 27 3.0%
+ libfontconfig.so.1 41 4.5%
+ libxpcom.so 49 5.4%
+ mozilla-bin 55 6.0%
+ libmozjs.so 80 8.8%
+ libc.so.1 115 12.6%
+ libgklayout.so 352 38.6%
+
+This shows that 352 samples found code from libgklayout.so running, which
+was 38.6% of the samples.
diff --git a/Examples/httpdstat_example.txt b/Examples/httpdstat_example.txt
new file mode 100644
index 000000000000..b9f59e8ca687
--- /dev/null
+++ b/Examples/httpdstat_example.txt
@@ -0,0 +1,36 @@
+The following is an example of using the httpdstat.d script.
+
+
+This Solaris 10 server is running Apache as a webserver. The script matches
+on the process name "httpd". Here it shows many GET connections,
+
+ # httpdstat.d
+ TIME NUM GET POST HEAD TRACE
+ 2005 Nov 29 18:46:46 38 38 0 0 0
+ 2005 Nov 29 18:46:47 109 109 0 0 0
+ 2005 Nov 29 18:46:48 112 112 0 0 0
+ 2005 Nov 29 18:46:49 113 113 0 0 0
+ 2005 Nov 29 18:46:50 107 107 0 0 0
+ 2005 Nov 29 18:46:51 56 56 0 0 0
+ 2005 Nov 29 18:46:52 0 0 0 0 0
+ 2005 Nov 29 18:46:53 0 0 0 0 0
+ 2005 Nov 29 18:46:54 20 20 0 0 0
+ 2005 Nov 29 18:46:55 48 48 0 0 0
+ ^C
+
+For a few seconds we had around 100 GETs per second.
+
+
+
+httpdstat.d accepts an argument as the sample interval, here we print a
+line every 30 seconds,
+
+ # httpdstat.d 30
+ TIME NUM GET POST HEAD TRACE
+ 2005 Nov 29 18:50:49 462 458 3 1 0
+ 2005 Nov 29 18:51:19 421 413 5 2 1
+ 2005 Nov 29 18:51:49 1361 1358 3 0 0
+ ^C
+
+The values are for the entire interval.
+
diff --git a/Examples/icmpstat_example.txt b/Examples/icmpstat_example.txt
new file mode 100644
index 000000000000..e8b8cfe6500b
--- /dev/null
+++ b/Examples/icmpstat_example.txt
@@ -0,0 +1,29 @@
+The following is a demonstration of the icmpstat.d script,
+
+
+Here we run it and catch an inbound ping,
+
+ # icmpstat.d
+ 2005 Jul 25 23:05:39,
+
+ STATISTIC VALUE
+
+ 2005 Jul 25 23:05:40,
+
+ STATISTIC VALUE
+ icmpOutMsgs 1
+ icmpOutEchoReps 1
+ icmpInEchos 1
+ icmpInMsgs 1
+
+ 2005 Jul 25 23:05:41,
+
+ STATISTIC VALUE
+
+ ^C
+
+Files such as /usr/include/inet/mib2.h may explain each of the statistics.
+
+The icmpstat.d is a simple demonstration of tracing ICMP activity. It may
+serve as the starting point for other scripts.
+
diff --git a/Examples/intbycpu_example.txt b/Examples/intbycpu_example.txt
new file mode 100644
index 000000000000..5ed213cba6ba
--- /dev/null
+++ b/Examples/intbycpu_example.txt
@@ -0,0 +1,11 @@
+The following is a demonstration of the intbycpu.d script,
+
+ # intbycpu.d
+ Tracing... Hit Ctrl-C to end.
+ ^C
+ CPU INTERRUPTS
+ 0 374
+ 1 412
+
+In the above output, CPU 1 had 412 interrupts, and CPU 0 had 374.
+
diff --git a/Examples/intoncpu_example.txt b/Examples/intoncpu_example.txt
new file mode 100644
index 000000000000..ed408eb6a17d
--- /dev/null
+++ b/Examples/intoncpu_example.txt
@@ -0,0 +1,93 @@
+The following is an example of the intoncpu.d script.
+
+
+Here we run it for a few seconds then hit Ctrl-C,
+
+ # ./intoncpu.d
+ Tracing... Hit Ctrl-C to end.
+ ^C
+ uhci1
+
+ value ------------- Distribution ------------- count
+ 2048 | 0
+ 4096 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2
+ 8192 | 0
+ uhci0
+
+ value ------------- Distribution ------------- count
+ 512 | 0
+ 1024 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 16
+ 2048 |@@@@ 2
+ 4096 |@@ 1
+ 8192 |@@ 1
+ 16384 | 0
+ rtls0
+
+ value ------------- Distribution ------------- count
+ 512 | 0
+ 1024 |@@@@@@@@@@@@@@@@ 8
+ 2048 |@@@@@@@@@@ 5
+ 4096 |@@@@@@ 3
+ 8192 | 0
+ 16384 |@@ 1
+ 32768 |@@ 1
+ 65536 |@@@@ 2
+ 131072 | 0
+
+The rtls0 driver (the network interface) has encourtered the most interrupts,
+with the time taken to process each interrupt visible as a distribution.
+These times ranged from around 1000 ns (1 us), to at least 65536 ns (65 us).
+
+To determine which devices the instance names represent (eg, "uhci1"), the
+/etc/path_to_inst file could be examied.
+
+
+
+The following is a longer example of running intoncpu.d,
+
+ # ./intoncpu.d
+ Tracing... Hit Ctrl-C to end.
+ ^C
+ uhci1
+
+ value ------------- Distribution ------------- count
+ 2048 | 0
+ 4096 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6
+ 8192 | 0
+ ata1
+
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@ 2
+ 32768 |@@@@@@@@@@@@@@@@@@@@ 2
+ 65536 | 0
+ ata0
+
+ value ------------- Distribution ------------- count
+ 2048 | 0
+ 4096 |@@@@@@@@@@@@@ 55
+ 8192 |@@@@@@@@@@@@@@@@@@@@@@@@@@ 113
+ 16384 |@ 5
+ 32768 | 0
+ uhci0
+
+ value ------------- Distribution ------------- count
+ 512 | 0
+ 1024 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1288
+ 2048 |@@ 53
+ 4096 | 6
+ 8192 | 0
+ rtls0
+
+ value ------------- Distribution ------------- count
+ 512 | 0
+ 1024 |@@@@@@@@@@@@@@@@@@@@ 665
+ 2048 |@@@@@@@@@ 307
+ 4096 |@ 35
+ 8192 | 0
+ 16384 |@@@@@@@ 229
+ 32768 |@@@ 91
+ 65536 |@ 19
+ 131072 | 1
+ 262144 | 0
+
diff --git a/Examples/inttimes_example.txt b/Examples/inttimes_example.txt
new file mode 100644
index 000000000000..384d700ba234
--- /dev/null
+++ b/Examples/inttimes_example.txt
@@ -0,0 +1,18 @@
+The following is a demonstration of the inttimes.d script,
+
+
+Here we run it for a few seconds then hit Ctrl-C,
+
+ # inttimes.d
+ Tracing... Hit Ctrl-C to end.
+ ^C
+ DEVICE TIME (ns)
+ ata0 22324
+ uhci1 45893
+ ata1 138559
+ uhci0 229226
+ i80420 1305617
+ rtls0 2540175
+
+In the above output, we can see that the rtls0 driver spent 2540 us on the
+CPU servicing interrupts, while ata0 spent only 22 us.
diff --git a/Examples/iofile_example.txt b/Examples/iofile_example.txt
new file mode 100644
index 000000000000..f4fc476910f0
--- /dev/null
+++ b/Examples/iofile_example.txt
@@ -0,0 +1,35 @@
+The following is a demonstration of the iofile.d script,
+
+
+Here we run it while a tar command is backing up /var/adm,
+
+ # iofile.d
+ Tracing... Hit Ctrl-C to end.
+ ^C
+ PID CMD TIME FILE
+ 5206 tar 109 /var/adm/acct/nite
+ 5206 tar 110 /var/adm/acct/sum
+ 5206 tar 114 /var/adm/acct/fiscal
+ 5206 tar 117 /var/adm/messages.3
+ 5206 tar 172 /var/adm/sa
+ 5206 tar 3605 /var/adm/messages.2
+ 5206 tar 4548 /var/adm/spellhist
+ 5206 tar 5769 /var/adm/exacct/brendan1task
+ 5206 tar 6416 /var/adm/acct
+ 5206 tar 7587 /var/adm/messages.1
+ 5206 tar 8246 /var/adm/exacct/task
+ 5206 tar 8320 /var/adm/pool
+ 5206 tar 8973 /var/adm/pool/history
+ 5206 tar 9183 /var/adm/exacct
+ 3 fsflush 10882 <none>
+ 5206 tar 11861 /var/adm/exacct/flow
+ 5206 tar 12042 /var/adm/messages.0
+ 5206 tar 12408 /var/adm/sm.bin
+ 5206 tar 13021 /var/adm/sulog
+ 5206 tar 19007 /var/adm/streams
+ 5206 tar 21811 <none>
+ 5206 tar 24918 /var/adm/exacct/proc
+
+In the above output, we can see that the tar command spent 24918 us (25 ms)
+waiting for disk I/O on the /var/adm/exacct/proc file.
+
diff --git a/Examples/iofileb_example.txt b/Examples/iofileb_example.txt
new file mode 100644
index 000000000000..21597f7e776d
--- /dev/null
+++ b/Examples/iofileb_example.txt
@@ -0,0 +1,23 @@
+The following is a demonstration of the iofileb.d script,
+
+
+Here we run it while a tar command is backing up /var/adm,
+
+ # ./iofileb.d
+ Tracing... Hit Ctrl-C to end.
+ ^C
+ PID CMD KB FILE
+ 29529 tar 56 /var/adm/sa/sa31
+ 29529 tar 56 /var/adm/sa/sa03
+ 29529 tar 56 /var/adm/sa/sa02
+ 29529 tar 56 /var/adm/sa/sa01
+ 29529 tar 56 /var/adm/sa/sa04
+ 29529 tar 56 /var/adm/sa/sa27
+ 29529 tar 56 /var/adm/sa/sa28
+ 29529 tar 324 /var/adm/exacct/task
+ 29529 tar 736 /var/adm/wtmpx
+
+In the above output, we can see that the tar command has caused 736 Kbytes
+of the /var/adm/wtmpx file to be read from disk. All af the Kbyte values
+measured are for disk activity.
+
diff --git a/Examples/iopattern_example.txt b/Examples/iopattern_example.txt
new file mode 100644
index 000000000000..818a4a22e6dc
--- /dev/null
+++ b/Examples/iopattern_example.txt
@@ -0,0 +1,57 @@
+The following is a demonstration of the iopattern program,
+
+
+Here we run iopattern for a few seconds then hit Ctrl-C. There is a "dd"
+command running on this system to intentionally create heavy sequential
+disk activity,
+
+ # iopattern
+ %RAN %SEQ COUNT MIN MAX AVG KR KW
+ 1 99 465 4096 57344 52992 23916 148
+ 0 100 556 57344 57344 57344 31136 0
+ 0 100 634 57344 57344 57344 35504 0
+ 6 94 554 512 57344 54034 29184 49
+ 0 100 489 57344 57344 57344 27384 0
+ 21 79 568 4096 57344 46188 25576 44
+ 4 96 431 4096 57344 56118 23620 0
+ ^C
+
+In the above output we can see that the disk activity is mostly sequential.
+The disks are also pulling around 30 Mb during each sample, with a large
+average event size.
+
+
+
+The following demonstrates iopattern while running a "find" command to
+cause random disk activity,
+
+ # iopattern
+ %RAN %SEQ COUNT MIN MAX AVG KR KW
+ 86 14 400 1024 8192 1543 603 0
+ 81 19 455 1024 8192 1606 714 0
+ 89 11 469 512 8192 1854 550 299
+ 83 17 463 1024 8192 1782 806 0
+ 87 13 394 1024 8192 1551 597 0
+ 85 15 348 512 57344 2835 808 155
+ 91 9 513 512 47616 2812 570 839
+ 76 24 317 512 35840 3755 562 600
+ ^C
+
+In the above output, we can see from the percentages that the disk events
+were mostly random. We can also see that the average event size is small -
+which makes sense if we are reading through many directory files.
+
+
+
+iopattern has options. Here we print timestamps "-v" and measure every 10
+seconds,
+
+ # iopattern -v 10
+ TIME %RAN %SEQ COUNT MIN MAX AVG KR KW
+ 2005 Jul 25 20:40:55 97 3 33 512 8192 1163 8 29
+ 2005 Jul 25 20:41:05 0 0 0 0 0 0 0 0
+ 2005 Jul 25 20:41:15 84 16 6 512 11776 5973 22 13
+ 2005 Jul 25 20:41:25 100 0 26 512 8192 1496 8 30
+ 2005 Jul 25 20:41:35 0 0 0 0 0 0 0 0
+ ^C
+
diff --git a/Examples/iopending_example.txt b/Examples/iopending_example.txt
new file mode 100644
index 000000000000..f4bc8225c867
--- /dev/null
+++ b/Examples/iopending_example.txt
@@ -0,0 +1,126 @@
+The following is a demonstration of the iopending tool,
+
+Here we run it with a sample interval of 1 second,
+
+ # iopending 1
+ Tracing... Please wait.
+ 2006 Jan 6 20:21:59, load: 0.02, disk_r: 0 KB, disk_w: 0 KB
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1010
+ 1 | 0
+
+ 2006 Jan 6 20:22:00, load: 0.03, disk_r: 0 KB, disk_w: 0 KB
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1000
+ 1 | 0
+
+ 2006 Jan 6 20:22:01, load: 0.03, disk_r: 0 KB, disk_w: 0 KB
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1000
+ 1 | 0
+
+ ^C
+
+The iopending tool samples at 1000 Hz, and prints a distribution of how many
+disk events were "pending" completion. In the above example the disks are
+quiet - for all the samples there are zero disk events pending.
+
+
+
+Now iopending is run with no arguments. It will default to an interval of 5
+seconds,
+
+ # iopending
+ Tracing... Please wait.
+ 2006 Jan 6 19:15:41, load: 0.03, disk_r: 3599 KB, disk_w: 0 KB
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4450
+ 1 |@@@ 390
+ 2 |@ 80
+ 3 | 40
+ 4 | 20
+ 5 | 30
+ 6 | 0
+
+ ^C
+
+In the above output there was a little disk activity. For 390 samples there
+was 1 I/O event pending; for 80 samples there was 2, and so on.
+
+
+
+
+In the following example iopending is run during heavy disk activity. We
+print output every 10 seconds,
+
+ # iopending 10
+ Tracing... Please wait.
+ 2006 Jan 6 20:58:07, load: 0.03, disk_r: 25172 KB, disk_w: 33321 KB
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@ 2160
+ 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6720
+ 2 |@@@@ 1000
+ 3 | 50
+ 4 | 30
+ 5 | 20
+ 6 | 10
+ 7 | 10
+ 8 | 10
+ 9 | 0
+
+ 2006 Jan 6 20:58:17, load: 0.05, disk_r: 8409 KB, disk_w: 12449 KB
+
+ value ------------- Distribution ------------- count
+ < 0 | 0
+ 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7260
+ 1 |@@@@@@@ 1700
+ 2 |@ 300
+ 3 | 0
+ 4 | 10
+ 5 | 10
+ 6 | 10
+ 7 | 20
+ 8 | 0
+ 9 | 0
+ 10 | 0
+ 11 | 0
+ 12 | 0
+ 13 | 0
+ 14 | 0
+ 15 | 0
+ 16 | 0
+ 17 | 10
+ 18 | 20
+ 19 | 0
+ 20 | 0
+ 21 | 0
+ 22 | 0
+ 23 | 0
+ 24 | 0
+ 25 | 0
+ 26 | 0
+ 27 | 0
+ 28 | 0
+ 29 | 0
+ 30 | 0
+ 31 | 10
+ >= 32 |@@@ 650
+
+ ^C
+
+In the first output, most of the time (67%) there was 1 event pending,
+and for a short time there were 8 events pending. In the second output we
+see many samples were off the scale - 650 samples at 32 or more pending
+events. For this sample I had typed "sync" in another window, which
+queued many disk events immediately which were eventually completed.
+
diff --git a/Examples/iosnoop_example.txt b/Examples/iosnoop_example.txt
new file mode 100644
index 000000000000..addb7dcbbe46
--- /dev/null
+++ b/Examples/iosnoop_example.txt
@@ -0,0 +1,39 @@
+The following demonstrates iosnoop. It was run on a system that was
+fairly quiet until a tar command was run,
+
+# ./iosnoop
+ UID PID D BLOCK SIZE COMM PATHNAME
+ 0 0 W 1067 512 sched <none>
+ 0 0 W 6496304 1024 sched <none>
+ 0 3 W 6498797 512 fsflush <none>
+ 0 0 W 1067 512 sched <none>
+ 0 0 W 6496304 1024 sched <none>
+ 100 443 R 892288 4096 Xsun /usr/openwin/bin/Xsun
+ 100 443 R 891456 4096 Xsun /usr/openwin/bin/Xsun
+ 100 15795 R 3808 8192 tar /usr/bin/eject
+ 100 15795 R 35904 6144 tar /usr/bin/eject
+ 100 15795 R 39828 6144 tar /usr/bin/env
+ 100 15795 R 3872 8192 tar /usr/bin/expr
+ 100 15795 R 21120 7168 tar /usr/bin/expr
+ 100 15795 R 43680 6144 tar /usr/bin/false
+ 100 15795 R 44176 6144 tar /usr/bin/fdetach
+ 100 15795 R 3920 8192 tar /usr/bin/fdformat
+ 100 15795 R 3936 8192 tar /usr/bin/fdformat
+ 100 15795 R 4080 8192 tar /usr/bin/fdformat
+ 100 15795 R 9680 3072 tar /usr/bin/fdformat
+ 100 15795 R 4096 8192 tar /usr/bin/fgrep
+ 100 15795 R 46896 6144 tar /usr/bin/fgrep
+ 100 15795 R 4112 8192 tar /usr/bin/file
+ 100 15795 R 4128 8192 tar /usr/bin/file
+ 100 15795 R 4144 8192 tar /usr/bin/file
+ 100 15795 R 21552 7168 tar /usr/bin/file
+ 100 15795 R 4192 8192 tar /usr/bin/fmli
+ 100 15795 R 4208 8192 tar /usr/bin/fmli
+ 100 15795 R 4224 57344 tar /usr/bin/fmli
+ 100 15795 R 4336 24576 tar /usr/bin/fmli
+ 100 15795 R 695792 8192 tar <none>
+ 100 15795 R 696432 57344 tar /usr/bin/fmli
+[...]
+
+
+
diff --git a/Examples/iotop_example.txt b/Examples/iotop_example.txt
new file mode 100644
index 000000000000..8cf55c189ba3
--- /dev/null
+++ b/Examples/iotop_example.txt
@@ -0,0 +1,142 @@
+The following are demonstrations of the iotop program,
+
+
+Here we run iotop with the -C option to not clear the screen, but instead
+provide a scrolling output,
+
+ # iotop -C
+ Tracing... Please wait.
+ 2005 Jul 16 00:34:40, load: 1.21, disk_r: 12891 KB, disk_w: 1087 KB
+
+ UID PID PPID CMD DEVICE MAJ MIN D BYTES
+ 0 3 0 fsflush cmdk0 102 4 W 512
+ 0 3 0 fsflush cmdk0 102 0 W 11776
+ 0 27751 20320 tar cmdk0 102 16 W 23040
+ 0 3 0 fsflush cmdk0 102 0 R 73728
+ 0 0 0 sched cmdk0 102 0 R 548864
+ 0 0 0 sched cmdk0 102 0 W 1078272
+ 0 27751 20320 tar cmdk0 102 16 R 1514496
+ 0 27751 20320 tar cmdk0 102 3 R 11767808
+
+ 2005 Jul 16 00:34:45, load: 1.23, disk_r: 83849 KB, disk_w: 488 KB
+
+ UID PID PPID CMD DEVICE MAJ MIN D BYTES
+ 0 0 0 sched cmdk0 102 4 W 1536
+ 0 0 0 sched cmdk0 102 0 R 131072
+ 0 27752 20320 find cmdk0 102 0 R 262144
+ 0 0 0 sched cmdk0 102 0 W 498176
+ 0 27751 20320 tar cmdk0 102 3 R 11780096
+ 0 27751 20320 tar cmdk0 102 5 R 29745152
+ 0 27751 20320 tar cmdk0 102 4 R 47203328
+
+ 2005 Jul 16 00:34:50, load: 1.25, disk_r: 22394 KB, disk_w: 2 KB
+
+ UID PID PPID CMD DEVICE MAJ MIN D BYTES
+ 0 27752 20320 find cmdk0 102 0 W 2048
+ 0 0 0 sched cmdk0 102 0 R 16384
+ 0 321 1 automountd cmdk0 102 0 R 22528
+ 0 27752 20320 find cmdk0 102 0 R 1462272
+ 0 27751 20320 tar cmdk0 102 5 R 17465344
+
+In the above output, we can see a tar command is reading from the cmdk0
+disk, from several different slices (different minor numbers), on the last
+report focusing on 102,5 (an "ls -lL" in /dev/dsk can explain the number to
+slice mappings).
+
+The disk_r and disk_w values give a summary of the overall activity in
+bytes.
+
+
+
+Bytes can be used as a yardstick to determine which process is keeping the
+disks busy, however either of the delta times available from iotop would
+be more accurate (as they take into account whether the activity is random
+or sequential).
+
+ # iotop -Co
+ Tracing... Please wait.
+ 2005 Jul 16 00:39:03, load: 1.10, disk_r: 5302 KB, disk_w: 20 KB
+
+ UID PID PPID CMD DEVICE MAJ MIN D DISKTIME
+ 0 0 0 sched cmdk0 102 0 W 532
+ 0 0 0 sched cmdk0 102 0 R 245398
+ 0 27758 20320 find cmdk0 102 0 R 3094794
+
+ 2005 Jul 16 00:39:08, load: 1.14, disk_r: 5268 KB, disk_w: 273 KB
+
+ UID PID PPID CMD DEVICE MAJ MIN D DISKTIME
+ 0 3 0 fsflush cmdk0 102 0 W 2834
+ 0 0 0 sched cmdk0 102 0 W 263527
+ 0 0 0 sched cmdk0 102 0 R 285015
+ 0 3 0 fsflush cmdk0 102 0 R 519187
+ 0 27758 20320 find cmdk0 102 0 R 2429232
+
+ 2005 Jul 16 00:39:13, load: 1.16, disk_r: 602 KB, disk_w: 1238 KB
+
+ UID PID PPID CMD DEVICE MAJ MIN D DISKTIME
+ 0 3 0 fsflush cmdk0 102 4 W 200
+ 0 3 0 fsflush cmdk0 102 6 W 260
+ 0 3 0 fsflush cmdk0 102 0 W 883
+ 0 27758 20320 find cmdk0 102 0 R 55686
+ 0 3 0 fsflush cmdk0 102 0 R 317508
+ 0 0 0 sched cmdk0 102 0 R 320195
+ 0 0 0 sched cmdk0 102 0 W 571084
+ [...]
+
+The disk time is in microseconds. In the first sample, we can see the find
+command caused a total of 3.094 seconds of disk time - the duration of the
+samples here is 5 seconds (the default), so it would be fair to say that
+the find command is keeping the disk 60% busy.
+
+
+
+A new option for iotop is to print percents "-P" which are based on disk
+I/O times, and hense are a fair measurementt of what is keeping the disks
+busy.
+
+ # iotop -PC 1
+ Tracing... Please wait.
+ 2005 Nov 18 15:26:14, load: 0.24, disk_r: 13176 KB, disk_w: 0 KB
+
+ UID PID PPID CMD DEVICE MAJ MIN D %I/O
+ 0 2215 1663 bart cmdk0 102 0 R 85
+
+ 2005 Nov 18 15:26:15, load: 0.25, disk_r: 5263 KB, disk_w: 0 KB
+
+ UID PID PPID CMD DEVICE MAJ MIN D %I/O
+ 0 2214 1663 find cmdk0 102 0 R 15
+ 0 2215 1663 bart cmdk0 102 0 R 67
+
+ 2005 Nov 18 15:26:16, load: 0.25, disk_r: 8724 KB, disk_w: 0 KB
+
+ UID PID PPID CMD DEVICE MAJ MIN D %I/O
+ 0 2214 1663 find cmdk0 102 0 R 10
+ 0 2215 1663 bart cmdk0 102 0 R 71
+
+ 2005 Nov 18 15:26:17, load: 0.25, disk_r: 7528 KB, disk_w: 0 KB
+
+ UID PID PPID CMD DEVICE MAJ MIN D %I/O
+ 0 2214 1663 find cmdk0 102 0 R 0
+ 0 2215 1663 bart cmdk0 102 0 R 85
+
+ 2005 Nov 18 15:26:18, load: 0.26, disk_r: 11389 KB, disk_w: 0 KB
+
+ UID PID PPID CMD DEVICE MAJ MIN D %I/O
+ 0 2214 1663 find cmdk0 102 0 R 2
+ 0 2215 1663 bart cmdk0 102 0 R 80
+
+ 2005 Nov 18 15:26:19, load: 0.26, disk_r: 22109 KB, disk_w: 0 KB
+
+ UID PID PPID CMD DEVICE MAJ MIN D %I/O
+ 0 2215 1663 bart cmdk0 102 0 R 76
+
+ ^C
+
+In the above output, bart and find jostle for disk access as they create
+a database of file checksums. The command was,
+
+ find / | bart create -I > /dev/null
+
+Note that the %I/O is in terms of 1 disk. A %I/O of say 200 is allowed - it
+would mean that effectively 2 disks were at 100%, or 4 disks at 50%, etc.
+
diff --git a/Examples/j_calldist_example.txt b/Examples/j_calldist_example.txt
new file mode 100644
index 000000000000..b659c0afc3ed
--- /dev/null
+++ b/Examples/j_calldist_example.txt
@@ -0,0 +1,247 @@
+This is an example of j_calldist.d showing the elapsed times for different
+types of Java operations.
+
+This traces activity from all Java processes on the system with hotspot
+provider support (1.6.0), and produces the output in graphical format, showing
+a histogram of the amount of time taken by each call. Method calls are only
+visible when using the flag "+ExtendedDTraceProbes". eg,
+java -XX:+ExtendedDTraceProbes classfile
+
+Because of the extensive results returned otherwise, this script will show you
+a configurable number of results in each section. The default (as in this
+example) is ten.
+
+Here we see it tracing the activity of Code/Java/Func_abc.
+
+# j_calldist.d
+Tracing... Hit Ctrl-C to end.
+^C
+
+Top 10 elapsed times (us),
+
+Top 10 exclusive method elapsed times (us),
+ PID=311342, method, sun/net/www/ParseUtil.decode
+ value ------------- Distribution ------------- count
+ 128 | 0
+ 256 |@@@@@@@@@@@@@ 3
+ 512 | 0
+ 1024 |@@@@@@@@@@@@@@@@@@@@@@ 5
+ 2048 |@@@@ 1
+ 4096 | 0
+
+ PID=311342, method, java/net/URLClassLoader.<clinit>
+ value ------------- Distribution ------------- count
+ 4096 | 0
+ 8192 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 16384 | 0
+
+ PID=311342, method, java/util/jar/JarFile.hasClassPathAttribute
+ value ------------- Distribution ------------- count
+ 4096 | 0
+ 8192 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 16384 | 0
+
+ PID=311342, method, java/util/zip/ZipFile.read
+ value ------------- Distribution ------------- count
+ 4096 | 0
+ 8192 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 16384 | 0
+
+ PID=311342, method, sun/nio/cs/US_ASCII.newEncoder
+ value ------------- Distribution ------------- count
+ 4 | 0
+ 8 |@@@@@@@@@@@@@@@@@@@@ 1
+ 16 | 0
+ 32 | 0
+ 64 | 0
+ 128 | 0
+ 256 | 0
+ 512 | 0
+ 1024 | 0
+ 2048 | 0
+ 4096 | 0
+ 8192 |@@@@@@@@@@@@@@@@@@@@ 1
+ 16384 | 0
+
+ PID=311342, method, java/util/zip/ZipFile.getInputStream
+ value ------------- Distribution ------------- count
+ 8 | 0
+ 16 |@@@@@@@@@@@@@@@@@@@@ 1
+ 32 | 0
+ 64 | 0
+ 128 | 0
+ 256 | 0
+ 512 | 0
+ 1024 | 0
+ 2048 | 0
+ 4096 | 0
+ 8192 |@@@@@@@@@@@@@@@@@@@@ 1
+ 16384 | 0
+
+ PID=311342, method, sun/nio/cs/US_ASCII.newDecoder
+ value ------------- Distribution ------------- count
+ 4 | 0
+ 8 |@@@@@@@@@@ 1
+ 16 |@@@@@@@@@@@@@@@@@@@@ 2
+ 32 | 0
+ 64 | 0
+ 128 | 0
+ 256 | 0
+ 512 | 0
+ 1024 | 0
+ 2048 | 0
+ 4096 | 0
+ 8192 |@@@@@@@@@@ 1
+ 16384 | 0
+
+ PID=311342, method, java/util/HashMap.<init>
+ value ------------- Distribution ------------- count
+ 4 | 0
+ 8 |@@@@@@@@@@@@@@ 8
+ 16 |@@@@@@@@@@@@@@@@ 9
+ 32 |@@@@@@@@@ 5
+ 64 | 0
+ 128 | 0
+ 256 | 0
+ 512 | 0
+ 1024 | 0
+ 2048 | 0
+ 4096 | 0
+ 8192 |@@ 1
+ 16384 | 0
+
+ PID=311342, method, java/io/UnixFileSystem.normalize
+ value ------------- Distribution ------------- count
+ 4 | 0
+ 8 |@ 1
+ 16 | 0
+ 32 | 0
+ 64 |@@@@@@@@@ 8
+ 128 |@@@@@@@@@@@@@ 11
+ 256 |@@@@@@ 5
+ 512 |@@@@@@@@@ 8
+ 1024 | 0
+ 2048 | 0
+ 4096 |@ 1
+ 8192 | 0
+
+ PID=311342, method, java/lang/Thread.sleep
+ value ------------- Distribution ------------- count
+ 262144 | 0
+ 524288 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3
+ 1048576 | 0
+
+
+Top 10 inclusive method elapsed times (us),
+ PID=311342, method, java/net/URLClassLoader$1.run
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@ 1
+ 32768 | 0
+ 65536 |@@@@@@@@@@@@@@@@@@@@ 1
+ 131072 | 0
+
+ PID=311342, method, java/net/URLClassLoader.findClass
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@ 1
+ 32768 | 0
+ 65536 |@@@@@@@@@@@@@@@@@@@@ 1
+ 131072 | 0
+
+ PID=311342, method, sun/misc/URLClassPath.getLoader
+ value ------------- Distribution ------------- count
+ 8 | 0
+ 16 |@@@ 1
+ 32 | 0
+ 64 | 0
+ 128 | 0
+ 256 | 0
+ 512 | 0
+ 1024 | 0
+ 2048 |@@@@@@ 2
+ 4096 |@@@@@@@@@@@@@@@@@@@@@@@@@ 8
+ 8192 | 0
+ 16384 |@@@ 1
+ 32768 | 0
+ 65536 |@@@ 1
+ 131072 | 0
+
+ PID=311342, method, java/lang/ClassLoader.loadClass
+ value ------------- Distribution ------------- count
+ 64 | 0
+ 128 |@@@@@@@@@ 6
+ 256 |@@@@@@@@@@@@@@@@@@@@@@ 15
+ 512 |@@@@ 3
+ 1024 | 0
+ 2048 | 0
+ 4096 | 0
+ 8192 | 0
+ 16384 | 0
+ 32768 | 0
+ 65536 |@@@@ 3
+ 131072 | 0
+
+ PID=311342, method, java/security/AccessController.doPrivileged
+ value ------------- Distribution ------------- count
+ 8 | 0
+ 16 |@@ 2
+ 32 |@ 1
+ 64 |@@@@ 4
+ 128 |@@@@@@@@@@@@@@@@ 17
+ 256 |@ 1
+ 512 |@@@@ 4
+ 1024 |@@ 2
+ 2048 |@ 1
+ 4096 |@@@@@@ 6
+ 8192 |@ 1
+ 16384 |@@ 2
+ 32768 | 0
+ 65536 |@@ 2
+ 131072 | 0
+
+ PID=311342, method, Func_abc.func_c
+ value ------------- Distribution ------------- count
+ 262144 | 0
+ 524288 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 1048576 | 0
+
+ PID=311342, method, Func_abc.func_b
+ value ------------- Distribution ------------- count
+ 524288 | 0
+ 1048576 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 2097152 | 0
+
+ PID=311342, method, java/lang/Thread.sleep
+ value ------------- Distribution ------------- count
+ 262144 | 0
+ 524288 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3
+ 1048576 | 0
+
+ PID=311342, method, Func_abc.func_a
+ value ------------- Distribution ------------- count
+ 1048576 | 0
+ 2097152 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 4194304 | 0
+
+ PID=311342, method, Func_abc.main
+ value ------------- Distribution ------------- count
+ 1048576 | 0
+ 2097152 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 4194304 | 0
+
+The elapsed times section is empty. It would show us anything that is not a
+Java method - garbage collection for example. However there was nothing of
+the kind in this example.
+
+The exclusive method elapsed times show us the time spent in the top ten most
+time consuming methods, not including time spent in subroutines called by
+those methods.
+
+The inclusive method elapsed times show us the time spent in the top ten most
+time consuming methods including time spent in subroutines called by those
+methods.
+
+It is important to pay close attention to the third column, "count" as this
+will indicate if there were any instances in a particular timeframe, even if
+the number is too small to show up on the histogram clearly.
diff --git a/Examples/j_calls_example.txt b/Examples/j_calls_example.txt
new file mode 100644
index 000000000000..3aacb2c9025c
--- /dev/null
+++ b/Examples/j_calls_example.txt
@@ -0,0 +1,137 @@
+The following are examples of running the j_calls.d script.
+
+This traces activity from all Java processes on the system with hotspot
+provider support (1.6.0). Method calls and object allocation are only visible
+when using the flag "+ExtendedDTraceProbes". eg,
+java -XX:+ExtendedDTraceProbes classfile
+
+Here we see it running on Code/Java/Func_abc
+
+# j_calls.d
+Tracing... Hit Ctrl-C to end.
+^C
+
+ PID TYPE NAME COUNT
+ 311334 cload Func_abc 1
+ 311334 cload java/io/BufferedInputStream 1
+ 311334 cload java/io/BufferedOutputStream 1
+ 311334 cload java/io/BufferedReader 1
+ 311334 cload java/io/BufferedWriter 1
+ 311334 cload java/io/Closeable 1
+ 311334 cload java/io/Console 1
+ 311334 cload java/io/Console$1 1
+ 311334 cload java/io/Console$1$1 1
+ 311334 cload java/io/DataInput 1
+ 311334 cload java/io/DataInputStream 1
+ 311334 cload java/io/DeleteOnExitHook 1
+ 311334 cload java/io/ExpiringCache 1
+ 311334 cload java/io/ExpiringCache$1 1
+ 311334 cload java/io/ExpiringCache$Entry 1
+ 311334 cload java/io/File 1
+ 311334 cload java/io/File$1 1
+ 311334 cload java/io/FileDescriptor 1
+ 311334 cload java/io/FileInputStream 1
+ 311334 cload java/io/FileOutputStream 1
+ 311334 cload java/io/FilePermission 1
+ 311334 cload java/io/FilePermission$1 1
+ 311334 cload java/io/FilePermissionCollection 1
+ 311334 cload java/io/FileReader 1
+ 311334 cload java/io/FileSystem 1
+ 311334 cload java/io/FilterInputStream 1
+ 311334 cload java/io/FilterOutputStream 1
+ 311334 cload java/io/Flushable 1
+ 311334 cload java/io/InputStream 1
+ 311334 cload java/io/InputStreamReader 1
+ 311334 cload java/io/ObjectStreamClass 1
+ 311334 cload java/io/ObjectStreamField 1
+ 311334 cload java/io/OutputStream 1
+ 311334 cload java/io/OutputStreamWriter 1
+ 311334 cload java/io/PrintStream 1
+ 311334 cload java/io/Reader 1
+ 311334 cload java/io/Serializable 1
+ 311334 cload java/io/UnixFileSystem 1
+ 311334 cload java/io/Writer 1
+ 311334 cload java/lang/AbstractStringBuilder 1
+ 311334 cload java/lang/Appendable 1
+ 311334 cload java/lang/ApplicationShutdownHooks 1
+ 311334 cload java/lang/ArithmeticException 1
+ 311334 cload java/lang/ArrayStoreException 1
+ 311334 cload java/lang/Boolean 1
+ 311334 cload java/lang/Byte 1
+ 311334 cload java/lang/CharSequence 1
+ 311334 cload java/lang/Character 1
+ 311334 cload java/lang/CharacterDataLatin1 1
+ 311334 cload java/lang/Class 1
+[... 1400 lines truncated ...]
+ 311334 method java/lang/Class.getClassLoader0 34
+ 311334 method java/lang/String.toLowerCase 34
+ 311334 method sun/security/action/GetPropertyAction.run 34
+ 311334 method java/nio/CharBuffer.arrayOffset 36
+ 311334 method java/util/HashMap.getEntry 36
+ 311334 method java/io/File.<init> 37
+ 311334 method java/io/UnixFileSystem.prefixLength 37
+ 311334 oalloc java/io/File 37
+ 311334 oalloc java/lang/reflect/Field 37
+ 311334 method java/io/BufferedReader.readLine 38
+ 311334 method java/util/concurrent/locks/AbstractOwnableSynchronizer.setExclusiveOwnerThread 38
+ 311334 method java/lang/CharacterDataLatin1.toLowerCase 41
+ 311334 method java/lang/CharacterDataLatin1.getProperties 43
+ 311334 method java/security/AccessController.doPrivileged 43
+ 311334 method java/util/Vector.size 43
+ 311334 method java/nio/Buffer.position 44
+ 311334 method java/nio/ByteBuffer.arrayOffset 44
+ 311334 method java/lang/System.getProperty 48
+ 311334 method java/util/Properties.getProperty 50
+ 311334 method java/util/BitSet.expandTo 51
+ 311334 method java/util/BitSet.set 51
+ 311334 method java/lang/System.checkKey 56
+ 311334 method java/lang/Thread.currentThread 57
+ 311334 method java/util/Hashtable$Entry.<init> 57
+ 311334 oalloc [Ljava/lang/String; 57
+ 311334 oalloc java/util/Hashtable$Entry 57
+ 311334 method java/util/Hashtable.get 59
+ 311334 method java/util/Hashtable.put 63
+ 311334 method java/util/BitSet.checkInvariants 71
+ 311334 method java/util/BitSet.wordIndex 72
+ 311334 method java/lang/StringBuilder.<init> 73
+ 311334 method java/lang/StringBuilder.toString 73
+ 311334 oalloc java/lang/StringBuilder 73
+ 311334 method java/lang/AbstractStringBuilder.expandCapacity 81
+ 311334 method java/util/HashMap.hash 81
+ 311334 method java/util/HashMap.indexFor 81
+ 311334 method java/lang/AbstractStringBuilder.<init> 82
+ 311334 method java/lang/Character.toLowerCase 82
+ 311334 method java/lang/String.startsWith 83
+ 311334 method java/util/Arrays.copyOf 87
+ 311334 method java/lang/String.lastIndexOf 90
+ 311334 method java/lang/String.substring 94
+ 311334 method java/util/Arrays.copyOfRange 107
+ 311334 method java/lang/String.getChars 156
+ 311334 method java/lang/System.getSecurityManager 174
+ 311334 method java/lang/String.<init> 175
+ 311334 method java/lang/String.equals 202
+ 311334 method java/lang/Math.min 208
+ 311334 method java/lang/String.hashCode 213
+ 311334 method java/lang/String.indexOf 302
+ 311334 oalloc [Ljava/lang/Object; 326
+ 311334 method java/lang/System.arraycopy 360
+ 311334 oalloc [I 374
+ 311334 oalloc java/lang/Class 395
+ 311334 oalloc [B 406
+ 311334 oalloc [S 486
+ 311334 method java/lang/StringBuilder.append 533
+ 311334 oalloc [[I 541
+ 311334 method java/lang/AbstractStringBuilder.append 549
+ 311334 method java/lang/Object.<init> 823
+ 311334 oalloc java/lang/String 931
+ 311334 oalloc [C 1076
+ 311334 method java/lang/String.charAt 1960
+
+This shows us each of the events associated with the PID 311334, and the
+number of times each event happened. These events can be of type cload (class
+load), method (method call), mcompile (method compile), mload (compiled method
+load), oalloc (object alloc) or thread (thread start).
+
+In this case you can see 1960 calls to java/lang/String.charAt, and 1076
+object allocations of type [C.
+
diff --git a/Examples/j_calltime_example.txt b/Examples/j_calltime_example.txt
new file mode 100644
index 000000000000..937e06f2a08a
--- /dev/null
+++ b/Examples/j_calltime_example.txt
@@ -0,0 +1,67 @@
+The following are examples of j_calltime.d.
+
+This script traces the elapsed time of Java methods and prints a report of the
+top ten in each category. This number is configurable with simple edit of
+the DTrace script
+
+Here it traces the example program, Code/Java/Func_abc
+
+# j_calltime.d
+Tracing... Hit Ctrl-C to end.
+^C
+
+Top 10 counts,
+ PID TYPE NAME COUNT
+ 311358 method java/lang/String.equals 202
+ 311358 method java/lang/Math.min 208
+ 311358 method java/lang/String.hashCode 213
+ 311358 method java/lang/String.indexOf 302
+ 311358 method java/lang/System.arraycopy 360
+ 311358 method java/lang/StringBuilder.append 533
+ 311358 method java/lang/AbstractStringBuilder.append 549
+ 311358 method java/lang/Object.<init> 823
+ 311358 method java/lang/String.charAt 1960
+ 0 total - 12020
+
+Top 10 elapsed times (us),
+ PID TYPE NAME TOTAL
+
+Top 10 exclusive method elapsed times (us),
+ PID TYPE NAME TOTAL
+ 311358 method java/nio/ByteBuffer.<init> 5430
+ 311358 method java/lang/String.charAt 6079
+ 311358 method java/lang/String.<init> 7306
+ 311358 method java/lang/StringBuilder.append 10240
+ 311358 method java/util/StringTokenizer.scanToken 11075
+ 311358 method java/net/URL.<clinit> 12519
+ 311358 method java/io/UnixFileSystem.normalize 13218
+ 311358 method sun/net/www/ParseUtil.decode 14208
+ 311358 method java/lang/Thread.sleep 3016374
+ 0 total - 3344993
+
+Top 10 inclusive method elapsed times (us),
+ PID TYPE NAME TOTAL
+ 311358 method sun/misc/Launcher.<clinit> 129120
+ 311358 method java/lang/ClassLoader.initSystemClassLoader 129851
+ 311358 method java/lang/ClassLoader.getSystemClassLoader 129897
+ 311358 method java/lang/ClassLoader.loadClass 267404
+ 311358 method java/security/AccessController.doPrivileged 278364
+ 311358 method Func_abc.func_c 1009971
+ 311358 method Func_abc.func_b 2019995
+ 311358 method java/lang/Thread.sleep 3016374
+ 311358 method Func_abc.func_a 3027043
+ 311358 method Func_abc.main 3027068
+
+Counts shows us how many times each different method was called, and how
+many methods were called in total.
+
+The exclusive method elapsed times show the time that each method spent
+processing code - while not in other method.
+
+The inclusive method elapsed times show the time that each method spent
+processing code, including the time spent in other calls.
+
+These elapsed times are the absolute time from when the method began to
+when it completed - which includes off-CPU time due to other system events
+such as I/O, scheduling, interrupts, etc.
+
diff --git a/Examples/j_classflow_example.txt b/Examples/j_classflow_example.txt
new file mode 100644
index 000000000000..b8a9b75000cd
--- /dev/null
+++ b/Examples/j_classflow_example.txt
@@ -0,0 +1,89 @@
+Following are examples of j_classflow.d.
+
+This watches Java method entries and returns from all Java processes on the
+system with hotspot provider support (1.6.0) and the flag
+"+ExtendedDTraceProbes". eg, java -XX:+ExtendedDTraceProbes classfile
+
+Here we can see it run on Code/Java/Func_abc.
+
+# j_classflow.d Func_abc
+ C PID TIME(us) -- CLASS.METHOD
+ 0 311425 4789778117827 -> Func_abc.main
+ 0 311425 4789778117844 -> Func_abc.func_a
+ 0 311425 4789779120071 -> Func_abc.func_b
+ 0 311425 4789780130070 -> Func_abc.func_c
+ 0 311425 4789781140067 <- Func_abc.func_c
+ 0 311425 4789781140079 <- Func_abc.func_b
+ 0 311425 4789781140087 <- Func_abc.func_a
+ 0 311425 4789781140095 <- Func_abc.main
+^C
+
+The first column, C gives us the CPU ID.
+
+The second column, TIME(us), gives us the time since boot in microseconds.
+
+The third column, PID gives us the Process ID.
+
+The fourth column, CLASS.METHOD gives us the Java class and method name.
+
+We can see that Func_abc.main called Func.abc.func_a, which in turn
+called Func_abc.funcb etc.
+
+Here we can see an example of running it on java/io/BufferedOutputStream
+
+# j_classflow.d java/io/BufferedOutputStream
+ C PID TIME(us) -- CLASS.METHOD
+ 0 311461 4790094765413 -> java/io/BufferedOutputStream.<init>
+ 0 311461 4790094765459 <- java/io/BufferedOutputStream.<init>
+ 0 311461 4790094779559 -> java/io/BufferedOutputStream.<init>
+ 0 311461 4790094779595 <- java/io/BufferedOutputStream.<init>
+ 0 311461 4790094965883 -> java/io/BufferedOutputStream.write
+ 0 311461 4790094965913 <- java/io/BufferedOutputStream.write
+ 0 311461 4790094965926 -> java/io/BufferedOutputStream.flush
+ 0 311461 4790094965936 -> java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790094966279 <- java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790094966293 <- java/io/BufferedOutputStream.flush
+ 0 311461 4790094966588 -> java/io/BufferedOutputStream.write
+ 0 311461 4790094966602 <- java/io/BufferedOutputStream.write
+ 0 311461 4790094966610 -> java/io/BufferedOutputStream.flush
+ 0 311461 4790094966618 -> java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790094966778 <- java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790094966787 <- java/io/BufferedOutputStream.flush
+ 0 311461 4790094966811 -> java/io/BufferedOutputStream.flush
+ 0 311461 4790094966819 -> java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790094966828 <- java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790094966836 <- java/io/BufferedOutputStream.flush
+ 0 311461 4790095970345 -> java/io/BufferedOutputStream.write
+ 0 311461 4790095970372 <- java/io/BufferedOutputStream.write
+ 0 311461 4790095970382 -> java/io/BufferedOutputStream.flush
+ 0 311461 4790095970390 -> java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790095970453 <- java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790095970462 <- java/io/BufferedOutputStream.flush
+ 0 311461 4790095970737 -> java/io/BufferedOutputStream.write
+ 0 311461 4790095970751 <- java/io/BufferedOutputStream.write
+ 0 311461 4790095970759 -> java/io/BufferedOutputStream.flush
+ 0 311461 4790095970766 -> java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790095970795 <- java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790095970804 <- java/io/BufferedOutputStream.flush
+ 0 311461 4790095970828 -> java/io/BufferedOutputStream.flush
+ 0 311461 4790095970836 -> java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790095970844 <- java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790095970853 <- java/io/BufferedOutputStream.flush
+ 0 311461 4790096980348 -> java/io/BufferedOutputStream.write
+ 0 311461 4790096980373 <- java/io/BufferedOutputStream.write
+ 0 311461 4790096980383 -> java/io/BufferedOutputStream.flush
+ 0 311461 4790096980391 -> java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790096980452 <- java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790096980460 <- java/io/BufferedOutputStream.flush
+ 0 311461 4790096980735 -> java/io/BufferedOutputStream.write
+ 0 311461 4790096980749 <- java/io/BufferedOutputStream.write
+ 0 311461 4790096980757 -> java/io/BufferedOutputStream.flush
+ 0 311461 4790096980765 -> java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790096980794 <- java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790096980803 <- java/io/BufferedOutputStream.flush
+ 0 311461 4790096980826 -> java/io/BufferedOutputStream.flush
+ 0 311461 4790096980834 -> java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790096980843 <- java/io/BufferedOutputStream.flushBuffer
+ 0 311461 4790096980851 <- java/io/BufferedOutputStream.flush
+
+
diff --git a/Examples/j_cpudist_example.txt b/Examples/j_cpudist_example.txt
new file mode 100644
index 000000000000..15abac649a5f
--- /dev/null
+++ b/Examples/j_cpudist_example.txt
@@ -0,0 +1,252 @@
+This is an example of j_cpudist.d showing the elapsed times for different
+types of Java operations.
+
+This traces activity from all Java processes on the system with hotspot
+provider support (1.6.0), and produces the output in graphical format, showing
+a histogram of the amount of time taken by each call. Method calls are only
+visible when using the flag "+ExtendedDTraceProbes". eg,
+java -XX:+ExtendedDTraceProbes classfile
+
+Because of the extensive results returned otherwise, this script will show you
+a configurable number of results in each section. The default (as in this
+example) is ten.
+
+Here we see it tracing the activity of Code/Java/Func_abc.
+
+# j_cpudist.d
+Tracing... Hit Ctrl-C to end.
+^C
+
+Top 10 on-CPU times (us),
+
+Top 10 exclusive method on-CPU times (us),
+ PID=311364, method, java/lang/AbstractStringBuilder.append
+ value ------------- Distribution ------------- count
+ 0 | 0
+ 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 382
+ 2 |@@@@@@@@@@@ 151
+ 4 |@ 13
+ 8 | 1
+ 16 | 1
+ 32 | 1
+ 64 | 0
+
+ PID=311364, method, java/util/Arrays.copyOf
+ value ------------- Distribution ------------- count
+ 1 | 0
+ 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 68
+ 4 |@@@@@@@ 15
+ 8 | 0
+ 16 | 0
+ 32 | 1
+ 64 | 1
+ 128 | 0
+ 256 |@ 2
+ 512 | 0
+
+ PID=311364, method, java/io/UnixFileSystem.normalize
+ value ------------- Distribution ------------- count
+ 1 | 0
+ 2 |@ 1
+ 4 | 0
+ 8 |@@@@@@@@@@@ 9
+ 16 |@@@@@@@@@@@@@@ 12
+ 32 |@@@@@@ 5
+ 64 |@@@@@@@ 6
+ 128 |@ 1
+ 256 | 0
+
+ PID=311364, method, java/io/File.<clinit>
+ value ------------- Distribution ------------- count
+ 512 | 0
+ 1024 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 2048 | 0
+
+ PID=311364, method, sun/misc/URLClassPath$JarLoader.getJarFile
+ value ------------- Distribution ------------- count
+ 512 | 0
+ 1024 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 2048 | 0
+
+ PID=311364, method, java/io/FilePermission$1.run
+ value ------------- Distribution ------------- count
+ 1 | 0
+ 2 |@@@@@@@@@@@@@@@@@@@@ 2
+ 4 |@@@@@@@@@@ 1
+ 8 | 0
+ 16 | 0
+ 32 | 0
+ 64 | 0
+ 128 | 0
+ 256 | 0
+ 512 | 0
+ 1024 |@@@@@@@@@@ 1
+ 2048 | 0
+
+ PID=311364, method, java/lang/StringBuilder.append
+ value ------------- Distribution ------------- count
+ 1 | 0
+ 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 526
+ 4 | 2
+ 8 | 0
+ 16 | 4
+ 32 | 1
+ 64 | 0
+
+ PID=311364, method, java/lang/String.<init>
+ value ------------- Distribution ------------- count
+ 1 | 0
+ 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 162
+ 4 |@@ 10
+ 8 | 0
+ 16 | 0
+ 32 | 0
+ 64 | 1
+ 128 | 0
+ 256 | 1
+ 512 | 0
+ 1024 | 1
+ 2048 | 0
+
+ PID=311364, method, java/lang/String.charAt
+ value ------------- Distribution ------------- count
+ 0 | 0
+ 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1953
+ 2 | 3
+ 4 | 1
+ 8 | 1
+ 16 | 2
+ 32 | 0
+
+ PID=311364, method, java/lang/System.initializeSystemClass
+ value ------------- Distribution ------------- count
+ 1024 | 0
+ 2048 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 4096 | 0
+
+
+Top 10 inclusive method on-CPU times (us),
+ PID=311364, method, sun/misc/Launcher$ExtClassLoader.<init>
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 32768 | 0
+
+ PID=311364, method, sun/misc/Launcher$ExtClassLoader.getExtClassLoader
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 32768 | 0
+
+ PID=311364, method, sun/misc/Launcher$ExtClassLoader.getExtURLs
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 32768 | 0
+
+ PID=311364, method, sun/misc/Launcher.<clinit>
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 32768 | 0
+
+ PID=311364, method, sun/misc/Launcher.<init>
+ value ------------- Distribution ------------- count
+ 8192 | 0
+ 16384 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 32768 | 0
+
+ PID=311364, method, java/lang/ClassLoader.loadClassInternal
+ value ------------- Distribution ------------- count
+ 32 | 0
+ 64 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6
+ 128 |@@@@@@@@@ 2
+ 256 | 0
+ 512 | 0
+ 1024 | 0
+ 2048 | 0
+ 4096 | 0
+ 8192 | 0
+ 16384 |@@@@ 1
+ 32768 | 0
+
+ PID=311364, method, sun/misc/Launcher$AppClassLoader.loadClass
+ value ------------- Distribution ------------- count
+ 32 | 0
+ 64 |@@@@@@@@@@@@@@@@@@@@@@@@@@@ 6
+ 128 |@@@@@@@@@ 2
+ 256 | 0
+ 512 | 0
+ 1024 | 0
+ 2048 | 0
+ 4096 | 0
+ 8192 | 0
+ 16384 |@@@@ 1
+ 32768 | 0
+
+ PID=311364, method, sun/misc/URLClassPath.getLoader
+ value ------------- Distribution ------------- count
+ 2 | 0
+ 4 |@@@ 1
+ 8 | 0
+ 16 | 0
+ 32 | 0
+ 64 | 0
+ 128 | 0
+ 256 |@@@ 1
+ 512 |@@@@@@@@@@@@@@@@@@@@@@ 7
+ 1024 |@@@@@@ 2
+ 2048 | 0
+ 4096 |@@@ 1
+ 8192 |@@@ 1
+ 16384 | 0
+
+ PID=311364, method, java/lang/ClassLoader.loadClass
+ value ------------- Distribution ------------- count
+ 16 | 0
+ 32 |@@@@@@@@@ 6
+ 64 |@@@@@@@@@@@@@@@@@@@@@ 14
+ 128 |@@@@@@ 4
+ 256 | 0
+ 512 | 0
+ 1024 | 0
+ 2048 | 0
+ 4096 | 0
+ 8192 |@ 1
+ 16384 |@@@ 2
+ 32768 | 0
+
+ PID=311364, method, java/security/AccessController.doPrivileged
+ value ------------- Distribution ------------- count
+ 2 | 0
+ 4 |@ 1
+ 8 |@@@@ 4
+ 16 |@@@@@@@@@@ 11
+ 32 |@@@@@@@@@@ 11
+ 64 | 0
+ 128 |@@@ 3
+ 256 |@ 1
+ 512 |@@@@@ 5
+ 1024 |@@ 2
+ 2048 |@ 1
+ 4096 |@ 1
+ 8192 |@@ 2
+ 16384 |@ 1
+ 32768 | 0
+
+The elapsed times section is empty. It would show us anything that is not a
+Java method - garbage collection for example. However there was nothing of
+the kind in this example.
+
+The exclusive method elapsed times show us the time spent on-CPU by the most
+time consuming methods, not including time spent in subroutines called by
+those methods.
+
+The inclusive method elapsed times show us the time spent on-CPU by the top
+ten most time consuming methods including time spent in subroutines called by
+those methods.
+
+It is important to pay close attention to the third column, "count" as this
+will indicate if there were any instances in a particular timeframe, even if
+the number is too small to show up on the histogram clearly.
+
diff --git a/Examples/j_cputime_example.txt b/Examples/j_cputime_example.txt
new file mode 100644
index 000000000000..0947cc05cbcd
--- /dev/null
+++ b/Examples/j_cputime_example.txt
@@ -0,0 +1,75 @@
+The following are examples of j_cputime.d.
+
+This script traces the on-CPU time of Java methods and prints a report. Here
+it traces the example program, Code/Java/Func_abc
+
+# j_cputime.d
+Tracing... Hit Ctrl-C to end.
+^C
+
+Top 10 counts,
+ PID TYPE NAME COUNT
+ 311374 method java/lang/String.equals 202
+ 311374 method java/lang/Math.min 208
+ 311374 method java/lang/String.hashCode 213
+ 311374 method java/lang/String.indexOf 302
+ 311374 method java/lang/System.arraycopy 360
+ 311374 method java/lang/StringBuilder.append 533
+ 311374 method java/lang/AbstractStringBuilder.append 549
+ 311374 method java/lang/Object.<init> 823
+ 311374 method java/lang/String.charAt 1960
+ 0 total - 12020
+
+Top 10 on-CPU times (us),
+ PID TYPE NAME TOTAL
+
+Top 10 exclusive method on-CPU times (us),
+ PID TYPE NAME TOTAL
+ 311374 method java/io/FilePermission$1.run 1055
+ 311374 method java/util/Arrays.copyOf 1110
+ 311374 method sun/net/www/ParseUtil.decode 1161
+ 311374 method java/io/File.<clinit> 1212
+ 311374 method java/lang/StringBuilder.append 1228
+ 311374 method java/io/UnixFileSystem.normalize 1402
+ 311374 method java/lang/String.<init> 2251
+ 311374 method java/lang/String.charAt 2262
+ 311374 method java/lang/System.initializeSystemClass 2751
+ 0 total - 99868
+
+Top 10 inclusive method on-CPU times (us),
+ PID TYPE NAME TOTAL
+ 311374 method java/lang/ClassLoader.loadClassInternal 25826
+ 311374 method sun/misc/Launcher$ExtClassLoader.getExtClassLoader 25914
+ 311374 method java/net/URL.<init> 27677
+ 311374 method sun/misc/Launcher.<init> 28566
+ 311374 method sun/misc/Launcher.<clinit> 28744
+ 311374 method java/lang/ClassLoader.initSystemClassLoader 29241
+ 311374 method java/lang/ClassLoader.getSystemClassLoader 29249
+ 311374 method java/lang/System.initializeSystemClass 33814
+ 311374 method java/lang/ClassLoader.loadClass 66564
+ 311374 method java/security/AccessController.doPrivileged 67499
+
+You can see that it prints the top ten results in each of four categories.
+
+The first section reports how many times each subroutine was called, and it's
+type.
+
+The second section reports on the on-CPU time of anything that was not of type
+"method", in this case - none.
+
+The exclusive method on-CPU times shows, amongst other results, that
+java/lang/String.charAt spent around 2,200 microseconds on-CPU. This times
+excludes time spent in other subroutines.
+
+The inclusive method on-CPU times show the times that various methods
+spent on-CPU. This includes the time spent in other subroutines called.
+
+These on-CPU times are the time the thread spent running on a CPU, from when
+the subroutine began to when it completed. This does not include time
+spent off-CPU time such as sleeping for I/O or waiting for scheduling.
+
+On-CPU times are useful for showing who is causing the CPUs to be busy.
+See Notes/ALLoncpu_notes.txt for more details. Also see
+Notes/ALLexclusive_notes.txt and Notes/ALLinclusive_notes.txt for a
+detailed explanation of exclusive vs inclusive subroutine time.
+
diff --git a/Examples/j_events_example.txt b/Examples/j_events_example.txt
new file mode 100644
index 000000000000..2c48700f3d21
--- /dev/null
+++ b/Examples/j_events_example.txt
@@ -0,0 +1,134 @@
+The following are examples of j_events.d.
+
+This counts events from all Java processes on the system with hotspot
+provider support (1.6.0). Some events such as method calls are only visible
+when using the flag "+ExtendedDTraceProbes". eg,
+java -XX:+ExtendedDTraceProbes classfile
+
+Here you can see it running while the program Code/Java/Func_abc
+
+# j_events.d
+Tracing... Hit Ctrl-C to end.
+^C
+
+ PID EVENT COUNT
+ 311379 AttachCurrentThread-entry 1
+ 311379 AttachCurrentThread-return 1
+ 311379 CallIntMethod-entry 1
+ 311379 CallIntMethod-return 1
+ 311379 CallStaticBooleanMethod-entry 1
+ 311379 CallStaticBooleanMethod-return 1
+ 311379 CallStaticObjectMethod-entry 1
+ 311379 CallStaticObjectMethod-return 1
+ 311379 CallStaticObjectMethodV-entry 1
+ 311379 CallStaticObjectMethodV-return 1
+ 311379 CallStaticVoidMethod-entry 1
+ 311379 CallStaticVoidMethod-return 1
+ 311379 CreateJavaVM-entry 1
+ 311379 CreateJavaVM-return 1
+ 311379 DestroyJavaVM-entry 1
+ 311379 DestroyJavaVM-return 1
+ 311379 DetachCurrentThread-entry 1
+ 311379 DetachCurrentThread-return 1
+ 311379 ExceptionCheck-entry 1
+ 311379 ExceptionCheck-return 1
+ 311379 ExceptionClear-entry 1
+ 311379 ExceptionClear-return 1
+ 311379 GetDefaultJavaVMInitArgs-entry 1
+ 311379 GetDefaultJavaVMInitArgs-return 1
+ 311379 GetJavaVM-entry 1
+ 311379 GetJavaVM-return 1
+ 311379 GetStringRegion-entry 1
+ 311379 GetStringRegion-return 1
+ 311379 NewByteArray-entry 1
+ 311379 NewByteArray-return 1
+ 311379 NewObject-entry 1
+ 311379 NewObject-return 1
+ 311379 NewObjectV-entry 1
+ 311379 NewObjectV-return 1
+ 311379 SetBooleanField-entry 1
+ 311379 SetBooleanField-return 1
+ 311379 ToReflectedMethod-entry 1
+ 311379 ToReflectedMethod-return 1
+ 311379 vm-init-begin 1
+ 311379 vm-init-end 1
+ 311379 vm-shutdown 1
+ 311379 NewGlobalRef-entry 2
+ 311379 NewGlobalRef-return 2
+ 311379 monitor-wait 2
+ 311379 GetStaticFieldID-entry 3
+ 311379 GetStaticFieldID-return 3
+ 311379 NewObjectArray-entry 3
+ 311379 NewObjectArray-return 3
+ 311379 SetStaticObjectField-entry 3
+ 311379 SetStaticObjectField-return 3
+ 311379 GetStaticMethodID-entry 4
+ 311379 GetStaticMethodID-return 4
+ 311379 EnsureLocalCapacity-entry 5
+ 311379 EnsureLocalCapacity-return 5
+ 311379 SetByteArrayRegion-entry 5
+ 311379 SetByteArrayRegion-return 5
+ 311379 SetLongField-entry 5
+ 311379 SetLongField-return 5
+ 311379 GetMethodID-entry 6
+ 311379 GetMethodID-return 6
+ 311379 GetObjectArrayElement-entry 6
+ 311379 GetObjectArrayElement-return 6
+ 311379 GetSuperclass-entry 6
+ 311379 GetSuperclass-return 6
+ 311379 thread-start 6
+ 311379 SetIntField-entry 8
+ 311379 SetIntField-return 8
+ 311379 GetArrayLength-entry 9
+ 311379 GetArrayLength-return 9
+ 311379 GetByteArrayRegion-entry 9
+ 311379 GetByteArrayRegion-return 9
+ 311379 RegisterNatives-entry 9
+ 311379 RegisterNatives-return 9
+ 311379 GetObjectClass-entry 10
+ 311379 GetObjectClass-return 10
+ 311379 FindClass-entry 11
+ 311379 FindClass-return 11
+ 311379 SetObjectArrayElement-entry 12
+ 311379 SetObjectArrayElement-return 12
+ 311379 GetStringUTFLength-entry 18
+ 311379 GetStringUTFLength-return 18
+ 311379 GetStringUTFRegion-entry 18
+ 311379 GetStringUTFRegion-return 18
+ 311379 GetFieldID-entry 21
+ 311379 GetFieldID-return 21
+ 309790 CallStaticVoidMethod-entry 24
+ 309790 CallStaticVoidMethod-return 24
+ 194441 CallStaticVoidMethod-entry 26
+ 194441 CallStaticVoidMethod-return 26
+ 311379 GetStringUTFChars-entry 29
+ 311379 GetStringUTFChars-return 29
+ 311379 ReleaseStringUTFChars-entry 29
+ 311379 ReleaseStringUTFChars-return 29
+ 311379 CallObjectMethod-entry 30
+ 311379 CallObjectMethod-return 30
+ 311379 GetStringCritical-entry 35
+ 311379 GetStringCritical-return 35
+ 311379 ReleaseStringCritical-entry 35
+ 311379 ReleaseStringCritical-return 35
+ 311379 ExceptionOccurred-entry 46
+ 311379 ExceptionOccurred-return 46
+ 311379 GetStringLength-entry 54
+ 311379 GetStringLength-return 54
+ 311379 NewStringUTF-entry 54
+ 311379 NewStringUTF-return 54
+ 311379 NewString-entry 55
+ 311379 NewString-return 55
+ 311379 GetObjectField-entry 60
+ 311379 GetObjectField-return 60
+ 311379 DeleteLocalRef-entry 108
+ 311379 DeleteLocalRef-return 108
+ 311379 class-loaded 327
+ 311379 object-alloc 5389
+ 311379 method-return 12024
+ 311379 method-entry 12031
+
+You can see that nearly all of the events recorded are from PID 311379, which
+we can assume in this case is the program in question. Not all of the lines
+correspond to this, however, which is something to be aware of while analysing
+the results.
diff --git a/Examples/j_flow_example.txt b/Examples/j_flow_example.txt
new file mode 100644
index 000000000000..433bef314224
--- /dev/null
+++ b/Examples/j_flow_example.txt
@@ -0,0 +1,1292 @@
+The following are examples of j_flow.d.
+
+This is a simple script to trace the not-so-simple flow of Java methods and
+classes. Here it traces the example program, Code/Java/func_abc
+
+# j_flow.d
+ C PID TIME(us) -- CLASS.METHOD
+ 0 311403 4789112583163 -> java/lang/Object.<clinit>
+ 0 311403 4789112583207 -> java/lang/Object.registerNatives
+ 0 311403 4789112583323 <- java/lang/Object.registerNatives
+ 0 311403 4789112583333 <- java/lang/Object.<clinit>
+ 0 311403 4789112583343 -> java/lang/String.<clinit>
+ 0 311403 4789112583732 -> java/lang/String$CaseInsensitiveComparator.<init>
+ 0 311403 4789112583743 -> java/lang/String$CaseInsensitiveComparator.<init>
+ 0 311403 4789112583752 -> java/lang/Object.<init>
+ 0 311403 4789112583760 <- java/lang/Object.<init>
+ 0 311403 4789112583767 <- java/lang/String$CaseInsensitiveComparator.<init>
+ 0 311403 4789112583774 <- java/lang/String$CaseInsensitiveComparator.<init>
+ 0 311403 4789112583783 <- java/lang/String.<clinit>
+ 0 311403 4789112583849 -> java/lang/System.<clinit>
+ 0 311403 4789112583859 -> java/lang/System.registerNatives
+ 0 311403 4789112583878 <- java/lang/System.registerNatives
+ 0 311403 4789112583887 -> java/lang/System.nullInputStream
+ 0 311403 4789112583895 -> java/lang/System.currentTimeMillis
+ 0 311403 4789112583905 <- java/lang/System.currentTimeMillis
+ 0 311403 4789112583913 <- java/lang/System.nullInputStream
+ 0 311403 4789112583923 -> java/lang/System.nullPrintStream
+ 0 311403 4789112583929 -> java/lang/System.currentTimeMillis
+ 0 311403 4789112583937 <- java/lang/System.currentTimeMillis
+ 0 311403 4789112583944 <- java/lang/System.nullPrintStream
+ 0 311403 4789112583951 -> java/lang/System.nullPrintStream
+ 0 311403 4789112583958 -> java/lang/System.currentTimeMillis
+ 0 311403 4789112583965 <- java/lang/System.currentTimeMillis
+ 0 311403 4789112583972 <- java/lang/System.nullPrintStream
+ 0 311403 4789112583982 <- java/lang/System.<clinit>
+ 0 311403 4789112584058 -> java/lang/ThreadGroup.<init>
+ 0 311403 4789112584068 -> java/lang/Object.<init>
+ 0 311403 4789112584075 <- java/lang/Object.<init>
+ 0 311403 4789112584100 <- java/lang/ThreadGroup.<init>
+ 0 311403 4789112584109 -> java/lang/ThreadGroup.<init>
+ 0 311403 4789112584116 -> java/lang/Object.<init>
+ 0 311403 4789112584123 <- java/lang/Object.<init>
+ 0 311403 4789112584139 -> java/lang/ThreadGroup.checkAccess
+ 0 311403 4789112584148 -> java/lang/System.getSecurityManager
+ 0 311403 4789112584157 <- java/lang/System.getSecurityManager
+ 0 311403 4789112584164 <- java/lang/ThreadGroup.checkAccess
+ 0 311403 4789112584175 -> java/lang/ThreadGroup.add
+ 0 311403 4789112584196 <- java/lang/ThreadGroup.add
+ 0 311403 4789112584202 <- java/lang/ThreadGroup.<init>
+ 0 311403 4789112584385 -> java/lang/Thread.<clinit>
+ 0 311403 4789112584396 -> java/lang/Thread.registerNatives
+ 0 311403 4789112584421 <- java/lang/Thread.registerNatives
+ 0 311403 4789112584779 -> java/lang/RuntimePermission.<init>
+ 0 311403 4789112584789 -> java/security/BasicPermission.<init>
+ 0 311403 4789112584798 -> java/security/Permission.<init>
+ 0 311403 4789112584806 -> java/lang/Object.<init>
+ 0 311403 4789112584814 <- java/lang/Object.<init>
+ 0 311403 4789112584823 <- java/security/Permission.<init>
+ 0 311403 4789112584831 -> java/security/BasicPermission.init
+ 0 311403 4789112584842 -> java/lang/String.length
+ 0 311403 4789112584850 <- java/lang/String.length
+ 0 311403 4789112584860 -> java/lang/String.charAt
+ 0 311403 4789112584869