This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Tcp tapping
- From: William Cohen <wcohen at redhat dot com>
- To: Ivan Novick <inovick at greenplum dot com>
- Cc: "systemtap at sourceware dot org" <systemtap at sourceware dot org>, Tim Heath <theath at greenplum dot com>
- Date: Fri, 14 May 2010 15:44:06 -0400
- Subject: Re: Tcp tapping
- References: <C812D7A5.2398%inovick@greenplum.com>
On 05/14/2010 01:34 PM, Ivan Novick wrote:
> Hi all,
>
> I am happily using sk_stream_wait_memory.stp sample program from the
> systemtap website to track the occurrences of TCP send calls by an
> application that are blocking on full send buffers.
>
> What I would like to do know is also print out the size of the send buffer
> that is full at the time of the blocking. I belive the kernel dynamically
> adjusts the size of the send buffer.
>
> Does any one have any tips or pointers on where to start looking to create a
> probe that could get this info?
>
> Cheers,
> Ivan
>
Hi Ivan,
There are a couple websites that index the linux kernels:
http://lxr.linux.no
http://rhkernel.org
These are very useful locating things in the kernel.You can look to see what calls
sk_stream_wait_memory() and the conditions that trigger those calls.
In linux 2.6.33 you can see that the call to sk_stream_wait_memory() occurs in net/ipv4/tcp.c in a couple places:
http://lxr.linux.no/#linux+v2.6.33/net/ipv4/tcp.c#L841
http://lxr.linux.no/#linux+v2.6.33/net/ipv4/tcp.c#L1090
Then you should be able to find which elements of the struct sock hold the information triggering the sk_stream_wait_memory().
-Will