[dtrace-discuss] run for cmd-line specified time ?

Peter Lawrence
Tue, 15 May 2007 03:47:10 -0000

I''ld like to be able to run my dtrace program for an amount of seconds
that I give as a command line argument, is there a standard cut-n-paste
boilerplate method for this...?...   I can pass the amount at the end of the
command-line, and within my dtrace program it will be available as
"$1",
but then what kind of probe can I write that will fire at $1 seconds plus
the BEGIN time, and will cause all my END probes to fire.

what I don''t want to do is have a probe that calls exit(), because the
docs say that the END probes will not be invoked in this case, but
I have END probes sprinkled throughout my program, which is a concatentaion
of a lot of mostly separate programs, hence I need the END probes to
trigger.


thanks,
-Pete.