Chime is a tool that all users of OpenSolaris should take the time to install. Chime is a graphical user interface for DTrace that makes viewing DTrace output enjoyable. It has traces that can provide valuable feedback on your system (and you don't even have to know DTrace to use it). For example, take this simple script that aggregates the system calls over the period of time the script is run:
bleonard@os200906:~$ cat syscalls_overtime.d
@a[execname] = count();
When run from the terminal for a couple of seconds the output looks as follows:
bleonard@os200906:~$ dtrace -qs syscalls_overtime.d
The same script run from Chime is much more useful. The columns are sortable, you can
control the interval (I only have a rough estimate of how long the
script from the terminal above ran) and you can navigate through the samples.
You can also drill-down:
bleonard@os200906:~$ gunzip Downloads/osol0chime-i386-1.4.pkg.gz
bleonard@os200906:~$ pfexec pkgadd -d Downloads/osol0chime-i386-1.4.pkg
The following packages are available:
1 OSOL0chime Chime Visualization Tool for DTrace
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:
Processing package instance <OSOL0chime> from </export/home/bleonard/Downloads/osol0chime-i386-1.4.pkg>
Chime Visualization Tool for DTrace(i386) 1.4.44
Using </opt> as the package base directory.
## Processing package information.
## Processing system information.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
Installing Chime Visualization Tool for DTrace as <OSOL0chime>
## Installing part 1 of 1.
Installation of <OSOL0chime> was successful
pfexec ln -s /opt/OSOL0chime/bin/chime /usr/bin/chime
You can log in again as follows:bleonard@os200906:~$ pfexec usermod -K defaultpriv=basic,dtrace_proc,dtrace_kernel bleonard
UX: usermod: bleonard is currently logged in, some changes may not take effect until next login.
bleonard@os200906:$ su bleonard
DTrace itself can be a bit daunting. A default installation of OpenSolaris has over 54,000 probes available:
bleonard@os200906:~$ dtrace -l | wc -l
And this number only grows as you install additional DTrace enabled software. My base installation of OpenSolaris has almost 70,000!
bleonard@opensolaris:~$ dtrace -l | wc -l
Probes are grouped by:
For more information on probes see the Probes topic in the DTrace Topics Guide.
Chime itself comes with over 70 traces. And if you look at the context menu above, one of the options is to look at the DTrace program, which provides an excellent opportunity to learn DTrace by example. Here's the program used for the drill-down into Firefox shown above:
If you're interested in learning more about DTrace, I found the Dynamic Tracing Guide and excellent resource.