[dtrace-discuss] Re: Using DTrace to monitor productions systems

Andreas.Haas at Sun.COM Andreas.Haas at Sun.COM
Fri Dec 15 06:06:24 PST 2006


On Fri, 15 Dec 2006, Dirk Volkmar wrote:

> Hi, Adam!
>
> Thats are good news. I'm not on the wrong path ;-)
>
> In the moment I have one problem to solve. It is the start up of the dtrace scripts collecting the performance data. The two proceses mentioned above are not started directly but from an other process.
> In the moment my solution is that i created wrapper shell scripts that call the dtrace with the process (-c switch). This solution has some problems:
>
> 1)If the controlling process shuts down the system the dtraces are killed, but the origin process are still running. Maybe I can handle this with forwarding it to the process (using trap, or something like that).
>
> 2) The startup of the processes is significantly slower than the normal startup. Are there any options to speed up the dtrace startup? I've noticed that there is a -S switch showing an dtrace intermediate code. But I'vent found any possibilty to use this code.

Don't know if if is applicable to you, but in our case the pids of our 
two daemons get simply passed as arguments $1 and $2 to the dtrace 
script

    pid$1::sge_log:entry, pid$2::sge_log:entry

the pids of our daemons are read from a pid file by a tiny 
boune shell wrapper scripts that launces dtrace like this

    /usr/sbin/dtrace -s ./monitor.d $master_pid $schedd_pid

I'm quite happy with using it that way, as it allows the monitor be 
started/stopped independently of daemons life-cycle as an interactive 
command. Integrating the monitor in daemon start-up procedures 
still is possible ;-)

Regards,
Andreas


More information about the dtrace-discuss mailing list