What is problem in this script ?
#!/usr/sbin/dtrace -s
#pragma D option quiet
fbt:ip:tcp_conn_request:entry
{
self->connp = (conn_t *)arg0;
self->tcp = (tcp_t *)self->connp->conn_tcp;
@backlog[self->tcp->tcp_conn_req_cnt_q,self->tcp->tcp_conn_req_max]=count();
printf("\ntcp_conn_req_cnt_q: %d\n",
self->tcp->tcp_conn_req_cnt_q);
printf("\ntcp_conn_req_max: %d\n", self->tcp->tcp_conn_req_max);
}
When i run appear error:
dtrace: error on enabled probe ID 1 (ID 38016:
fbt:ip:tcp_conn_request:entry): invalid address (0x0) in action #4 at
DIF offset 12
--
+++++++++++++++++++++++++++++++++++++++++++++++
Wesley Naves de Faria
Analista de Suporte
SCSA - Sun Certified System Administrator for Solaris 10
SCNA - Sun Certified Network Administrator for Solaris 10
FreeBSD / OpenBSD / Linux
+++++++++++++++++++++++++++++++++++++++++++++++
Wesley Naves de faira wrote:> What is problem in this script ?One of the pointers you''re dereferencing is NULL.> > #!/usr/sbin/dtrace -s > > #pragma D option quiet > > fbt:ip:tcp_conn_request:entry > { > self->connp = (conn_t *)arg0; > self->tcp = (tcp_t *)self->connp->conn_tcp; > > > @backlog[self->tcp->tcp_conn_req_cnt_q,self->tcp->tcp_conn_req_max]=count(); > > printf("\ntcp_conn_req_cnt_q: %d\n", self->tcp->tcp_conn_req_cnt_q); > printf("\ntcp_conn_req_max: %d\n", self->tcp->tcp_conn_req_max); > } > > > When i run appear error: > > dtrace: error on enabled probe ID 1 (ID 38016: > fbt:ip:tcp_conn_request:entry): invalid address (0x0) in action #4 at > DIF offset 12 >-- Michael Schuster http://blogs.sun.com/recursion Recursion, n.: see ''Recursion''
According to http://opensolaris.org/jive/thread.jspa?messageID=240975, the tcp_conn is misplaced at conn_sqp. So, self->tcp = (tcp_t *)self->connp->conn_tcp; may be self->tcp = (tcp_t *)self->connp->conn_sqp; -- This message posted from opensolaris.org