On Fri, Jun 06, 2008 at 12:43:56PM +0200, Mikael Ronstr?m wrote:
> Hi,
> In MySQL Cluster we have a DTrace probe for signals and signals have  
> numbers which
> is the parameter to the DTrace scripts.
> 
> However for the use of the scripts it would be very nice to have the  
> name of the signal instead.
> So to do this I can obviously initialise an array at BEGIN.
> 
> However if I want to share this very long initialisation statement in  
> many scripts is there a simple
> way of doing that. Also can one have several probes on the same entry?
> 
> Rgrds Mikael

FYI, we already provide all Solaris signal names in /usr/lib/dtrace/signal.d
which is included by default.  So you can use signal names as identifiers.

Example:

# dtrace -qn 'BEGIN{printf("%d", SIGKILL);exit(0);}'
9

-Mike

-- 
Mike Shapiro, Sun Microsystems Fishworks. blogs.sun.com/mws/
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to