I'm currently participating under
DTrace
OpenSolaris community . Here you can find several educational
resources about DTrace
and DTraceToolkit
Contents
This section is dedicated to DTrace framework.
|
OneLiners DTraceToolkit: DTT DTrace at work References |
oneliners example of using DTrace presentations: DTrace and DTraceToolkit sample cases of how to use DTrace other references |
Useful examples of how to construct one line commands in D language in order to debug certain situations.
General
System Calls Count by Application
$ dtrace -n 'syscall:::entry{@[execname] = count();}'
System Calls Count by Application and Process
$ dtrace -n 'syscall:::entry{@[execname,pid] = count();}'
How many times a file has been opened
$ dtrace -n 'syscall::open:entry{@[copyinstr(arg0)] = count();}'
Files Opened by process
$ dtrace -qn 'syscall::open*:entry{ printf("%s %s\n",execname,copyinstr(arg0)); }'
Read Bytes by process
$ dtrace -n 'sysinfo:::readch{ @[execname] = sum(arg0);}'
Write Bytes by process
$ dtrace -n 'sysinfo:::writech{ @[execname] = sum(arg0);}'
How big a read is
$ dtrace -n 'syscall::read:entry{@[execname] = quantize(arg2);}'
How big a write is
$ dtrace -n 'syscall::write:entry{@[execname] = quantize(arg2);}'
Disk size by process
$ dtrace -qn 'io:::start{printf("%d %s %d\n",pid,execname,args[0]->b_bcount); }'
High system time
$ dtrace -n profile-501'{@[stack()] = count()}END{trunc(@, 25)}'
What processes are using fork
$ dtrace -n 'syscall::fork*:entry{printf("%s %d",execname,pid);}'
My application is doing nothing
$ dtrace -n sched:::off-cpu'{@[ustack()] = count()}' -p pid
|
You can find below a short presentation about DTrace framework found on Solaris 10
and about DTraceToolkit: a big collection of D scripts developed to help your life.
There is a partial translation of the DTT presentation in japanese
done by: Kenji Funasaki, thanks Kenji! OpenOffice 2.x was used to edit these files.
This is work in progress !
| Item | English | Japanese | Romanian | Description |
| DTT Presentation - version 0.96 |
dtt_present.odp dtt_present.pdf |
dtt_present-ja.odp | n/a | |
| DTT Presentation - version 1.0 | n/a | n/a | n/a | Work in progress ! |
Back to main homepage
Created: 2006-12-24
Last updated: 2007-10-01