Re: udp input queue

From: Casper H.S. Dik (Casper.Dik_at_Sun.COM)
Date: 11/25/03


Date: 25 Nov 2003 13:21:26 GMT

clapidus@hotmail.com (Claudio Lapidus) writes:

>Hello

>I'm debugging an application than listens on an UDP (unprivileged)
>port and I'm suspecting a queue buildup at certain peak load times. I
>need to monitor the status of a particular input queue (how many
>packets/bytes are waiting for service) at a certain moment.

>I investigated netstat and ndd but haven't found anything useful. I recall
>being able to do this on Tru64's and Linux' versions of netstat, but
>on Solaris I'm stuck.

It's fairly tricky because you need to get at the "read queue" belonging
to the specific file descriptor.

The chain to follow is something like this:

(fd 30, in pid 0t2215)

0t2215::pid2proc | ::print proc_t p_user.u_finfo.fi_list[0t30].uf_file[0].f_vn
ode[0].v_stream[0].sd_wrq[-1]

(mdb doesn't understand the [-1] syntax, so you need to print the write
queue and then substract (sizeof queue_t); then dereference that
to get "q_count".

Casper

-- 
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

Quantcast