source availablility has nothing to do with tracing
Posted Nov 21, 2004 0:48 UTC (Sun) by
cajal (subscriber, #4167)
In reply to:
Give Sun their due. by hppnq
Parent article:
Solaris 10
That's just silly. DTrace (and tracing toolkits in general) having nothing to do with source
availablity. They're used to debug and profile individual applications and even entire systems.
p>
Consider these two questions which a sysadmin might be asked in a typical day:
* What processes are causing so much swapping?
* What processes are generating disk I/O?
Without tracing toolkits, these questions can be difficult, if not impossible to answer. With
DTrace, each takes a 5-line script:
What processes are causing so much swapping
#!/usr/bin/dtrace -s
vminfo:::pgin
{
@[pid, execname] = count();
}
This will give you a histogram of what processes are causing pageins.
What processes are generating disk I/O?
#!/usr/sbin/dtrace -s
io:::start
{
@[execname, uid] = sum(args[0]->b_bcount);
}
That'll give you a histogram of disk I/O broken down by process name and uid.
Even if you had all the source to the OS, you couldn't answer these questions without an
appropriate tool. DTrace is one such tool. It can, of course, do a lot more. For a nice overview, I
highly suggest
this blog entry by Bryan Cantrill, one of DTrace's developers.
(
Log in to post comments)