Hans-Peter
2010-06-03 10:35:35 UTC
Hi
I am trying to make a dtrace script that captures tcp packets sent by a specific process.
But I receive the message:
dtrace: error on enabled probe ID 3 (ID 35884: fbt:sockfs:sostream_direct:return): invalid address (0x106390000) in action #1 at DIF offset 12
Can someone explain why this happens?
regards HansP
#!/usr/sbin/dtrace -Cs
/*
* Command line arguments
*/
#include <sys/file.h>
#include <inet/common.h>
#include <sys/byteorder.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
/*
* Print header
*/
dtrace:::BEGIN
{
/* starting values */
counts = COUNTER;
secs = INTERVAL;
TCP_out = 0;
TCP_in = 0;
printf("Tracing... Please wait.\n");
start = 0;
}
fbt:sockfs:sostream_direct:entry
/ pid == $1 && start == 0 /
{
self->sop = 1;
self->nsop = (struct sonode *)arg1;
self->tcpp = (tcp_t *)self->nsop->so_priv;
self->laddrs = self->nsop->so_laddr_sa;
start = 1;
printf("%50s : %10d\n","fbt:sockfs:sostream_direct:entry",self->nsop->so_sndbuf);
}
fbt:sockfs:sostream_direct:return
/ pid == $1 && start == 1 /
{
self->connp = (conn_t *)self->tcpp->tcp_connp;
/*printf("%50s %10d\n","fbt:sockfs:sostream_direct:return",self->laddr->soa_len); */
printf("%50s \n","fbt:sockfs:sostream_direct:return");
}
I am trying to make a dtrace script that captures tcp packets sent by a specific process.
But I receive the message:
dtrace: error on enabled probe ID 3 (ID 35884: fbt:sockfs:sostream_direct:return): invalid address (0x106390000) in action #1 at DIF offset 12
Can someone explain why this happens?
regards HansP
#!/usr/sbin/dtrace -Cs
/*
* Command line arguments
*/
#include <sys/file.h>
#include <inet/common.h>
#include <sys/byteorder.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
/*
* Print header
*/
dtrace:::BEGIN
{
/* starting values */
counts = COUNTER;
secs = INTERVAL;
TCP_out = 0;
TCP_in = 0;
printf("Tracing... Please wait.\n");
start = 0;
}
fbt:sockfs:sostream_direct:entry
/ pid == $1 && start == 0 /
{
self->sop = 1;
self->nsop = (struct sonode *)arg1;
self->tcpp = (tcp_t *)self->nsop->so_priv;
self->laddrs = self->nsop->so_laddr_sa;
start = 1;
printf("%50s : %10d\n","fbt:sockfs:sostream_direct:entry",self->nsop->so_sndbuf);
}
fbt:sockfs:sostream_direct:return
/ pid == $1 && start == 1 /
{
self->connp = (conn_t *)self->tcpp->tcp_connp;
/*printf("%50s %10d\n","fbt:sockfs:sostream_direct:return",self->laddr->soa_len); */
printf("%50s \n","fbt:sockfs:sostream_direct:return");
}
--
This message posted from opensolaris.org
This message posted from opensolaris.org