This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Tcp tapping


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]