Hey William,

There are a variety of reasons why dtrace(1M) would be unable to grab the 
process -- for example, if the process you identified doesn't exist or if you 
don't have permissions to it. Try this:

  truss -t open dtrace -s adc.d 24930

... you might see output like this:

...
open("/proc/24930/as", O_RDONLY|O_EXCL)         Err#2 ENOENT
open("/proc/24930/as", O_RDONLY)                Err#2 ENOENT

Adam

On May 7, 2010, at 11:43 AM, William Reich wrote:

> I have a very simple dtrace script ( shown below ).
> This script works on simple programs just fine.
>  
> Now I want to use this script on a large C++ executable.
> The executable is 8.5 meg in size on a x86 platform.
> This executable has more than 10 threads in it.
>  
> I try to execute that  the dtrace script and I get this error –
>  
> ./adc.d 24930
> dtrace: failed to compile script  ./adc.d: line 7: failed to grab process 
> 24930
>  
> What is the error really trying to tell me ?
>  
> wr
> #######################
>  
> #!/usr/sbin/dtrace -qs
> BEGIN
> {       flag =  1 ; }
>  
> END
> {       flag = 0 ; }
> pid$1:::entry
> {
> self->t[probefunc] = timestamp ;
> }
>  
> pid$1:::return
> /self->t[probefunc] && flag /
> {       this->time = timestamp - self->t[probefunc] ;
>         @[probefunc] = avg(this->time) ;
>         self->t[probefunc] = 0 ;
> }
>  
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss@opensolaris.org


--
Adam Leventhal, Fishworks                        http://blogs.sun.com/ahl

_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to