Hi when do we use the '' -w '' when writing a D script? i.e. #!/usr/sbin/dtrace -ws thanks This message posted from opensolaris.org
Melanie Pfefer writes: > Hi > > when do we use the '' -w '' when writing a D script? > i.e. > #!/usr/sbin/dtrace -ws > > thanks > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org If you need the destructive actions within the probes for instance chill() (a delay) or panic(). The destructive actions are described in Chapter 10 of the Solaris Dynamic Tracing Guide. dtrace -w -n ''myfunc:entry{chill(10000)}'' Without the -w I get: dtrace: error on enabled probe ID 1 (ID 32316: fbt:mymod:myfunc:entry): invalid kernel access in action #1 -r
found it out. -w allows destructive actions such as stop() This message posted from opensolaris.org
thanks! Why should we write exit(0) after stop()?? thx again This message posted from opensolaris.org
Melanie, Two different processes: the destructive action "stop()" stops the process that caused the probe to fire, while "exit()" causes your D program to exit. Chip Melanie Pfefer wrote:> thanks! > > Why should we write exit(0) after stop()?? > > thx again > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >