I M POOPED
Excellent session around dtrace this evening from a popular (as in he had to leave for a flight) kernel engineer. For those who have haven't had a chance, here is a very quick view from one who is not worthy:
I ran 'dtrace -l >> (some file)' to capture all the structures. The file format has 4 columns which are a one-to-one relation to the 'PROVIDER:MODULE:FUNCTION:NAME' structure of dtrace commands. For example ID #XX, syscall, (no module), ioctl, entry would be denoted as 'syscall::ioctl:entry' -- and since wildcards are supported, I can run 'dtrace -n ':syscall::ioctl:' with the quotes, or any other combination thereof.
The session presenter really didn't offer 'scripts' as he discussed that in the real world, he was never allowed to take or leave anything on the production server, and developed a talent for command-line dtrace compiles. He also used a tabbed shell with history to help.
Your "file".d script will have the following format:
#!/usr/sbin/dtrace -s
/* comments are c-related
* where they have to have
* a distinct end
*/
/* PROVIDER:MODULE:FUNCTION:NAME */
syscall::ioctl:entry
/* Predicate serves as filter */
/execname == "dtrace"/
*/ Function start *
{
trace(timestamp)
}
/* end */
Give it a w-q-BANG, chmod +x and execute and marvel
It seems that build 71 has a /usr/demo/dtrace package, and for us internal, dtrace.eng has some samples.
(Sigh) I don't know if a reload is worth the demo package.
BUT I NEED A FRIGGIN' ~PDF READER!!!!
( Nov 19 2004, 11:53:31 PM CST ) Permalink
Comments are closed for this entry.

