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
syscall:::entry
{
@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
\^C
devfsadm 2
updatemanagernot 2
dhcpagent 3
gam_server 6
gvfsd-trash 6
dlmgmtd 8
gvfs-hal-volume- 8
nautilus 9
clock-applet 12
gnome-panel 12
gnome-settings-d 16
metacity 16
java 26
bonobo-activatio 56
gnome-netstatus- 80
gnome-terminal 93
VBoxClient 120
firefox-bin 160
Xorg 281
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
(i386) 1.4.44
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
http://www.opensolaris.org/os/project/dtrace-chime/
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.
/opt/OSOL0chime/bin/chime
...
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
Password:
DTrace itself can be a bit daunting. A default installation of OpenSolaris has over 54,000 probes available:
bleonard@os200906:~$ dtrace -l | wc -l
54012
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
69229
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.
This tool has come a long way... Now, how do I run chime against a remote system without painfully expensive X forwarding? Is there a remote option? Nothing interesting happens on my workstation -- only the servers behind two firewalls half-way across the world.
Any plans on integrating it to /contrib repo?
Cooool......
Theo Schlossnagle: I just use VNC. It's much faster than X forwarding.
this is the coolest thing I had waited for to learn about kernel
great!