Prustat throwing error only in zones not in global

Hi,

Prustat is throwing error only in zones. But it is working fine in global.

dtrace: invalid probe specifier
/*
** The following is a trimmed version of two seperate DTrace scripts:
**
** socketsnoop.d - snoop TCP network socket traffic by process.
**  This is intended to identify the process responsible
**  for network traffic. Written in DTrace (Solaris 10 build 63).
**
** iosnoop.d - A program to print I/O events as they happen, with useful
**      details such as UID, PID, inode, command, etc.
**      Written in DTrace (Solaris 10 build 63).
**
*/

#pragma D option quiet


/*
** --- TIMESTAMPS ---
*/
dtrace:::BEGIN {
        printf("B %d\n",timestamp);
        /* last is used as a timestamp to the disk request, OR,
           to the last disk completion. This is needed to avoid
           over counting disk times due to disk buffers (queues),
           however remains a minor simplification. */
        last = timestamp;
}
io:::done
{
        printf("D %d %d %d %d %s\n",
         this->suid,this->spid,this->delta,args[0]->b_bcount,
         this->scomm == 0 ? "." : stringof(this->scomm));
}


/*
** --- NETWORK ----
*/

/*
**  Store Write Values
*/
fbt:ip:tcp_output:entry
{
        self->uid = curpsinfo->pr_euid;
        self->pid = pid;
        self->comm = (char *)curpsinfo->pr_fname;
        self->size = msgdsize(args[1]);
        self->ok = 1;
}

/*
**  Store Read Values
*/
fbt:sockfs:sotpi_recvmsg:entry
{
        self->uid = curpsinfo->pr_euid;
        self->pid = pid;
        self->comm = (char *)curpsinfo->pr_fname;
        /* We track the read request (man uio), */
        self->uiop = (struct uio *) arg2;
        self->residual = self->uiop->uio_resid;
        /* The following ensures the type is AF_INET (sys/socket.h), */
        this->sonode = (struct sonode *)arg0;
        self->ok = (int)this->sonode->so_type == 2 ? 1 : 0;
}
fbt:sockfs:sotpi_recvmsg:return
/arg0 != 0 && self->ok/
{
        /* calculate successful read size */
        self->size = self->residual - self->uiop->uio_resid;
}

/*
**  Print output
*/
fbt:ip:tcp_output:entry, fbt:sockfs:sotpi_recvmsg:return
/self->ok/
{
        printf("N %d %d %d %s\n",self->uid,self->pid,
         self->size,stringof(self->comm));
        self->ok = 0;
        self->uid = 0;
        self->pid = 0;
        self->comm = 0;
        self->size = 0;
        self->residual = 0;
        self->uiop = 0;
}
: probe description dtrace:::BEGIN does not match any probes

Actually what the error is printing on screen is the code inside Prustat after _DATA_ line

uname -r

output on global and zone as below,
Global:5.11
zone:5.10

I have tried setting

limitpriv="default,dtrace_proc,dtrace_user"

to the zone. But still not working

TIA

It's a zone rights issue:

https://dtrace-discuss.opensolaris.narkive.com/Or7wp4FM/dtrace-scripts-not-working

Correct me if I'm wrong: you have a global zone running Solaris 11, and branded zones running solaris 10 ?

If yes then:
dtrace routines that work on 11 are not guaranteed to work on 10.

Try downloading some scripts from here: Keep them on separate directories from any 11 dtrace code.
DTrace Tools

If @jlliagre stops by he will likely have better suggestions

Hi,

Thanks for the reply.

@hicksd8 I have followed the steps mentioned in the link

https://dtrace-discuss.opensolaris.n...ts-not-working
zonecfg -z z1-zonename
info
brand: solaris10
autoboot: true
autoshutdown: shutdown
bootargs:
pool:
limitpriv: default,dtrace_proc,dtrace_user

After setting I have rebooted the zone also.

And @jim mcnamara, I have downloaded the Prustat from the mentioned link.Still no luck

TIA