RE: Seeing TCP socket options (nodelay, cork, etc) in Linux procfs or elsewhere?

From: MacCana, Mike
Date: Tue Mar 16 2010 - 14:25:15 EST


-----Original Message-----
From: Eric Dumazet [mailto:eric.dumazet@xxxxxxxxx]
Sent: 15 March 2010 16:21
To: MacCana, Mike
Cc: linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: Seeing TCP socket options (nodelay, cork, etc) in Linux procfs or elsewhere?

>>Le lundi 15 mars 2010 à 15:49 +0000, MacCana, Mike a écrit :
>>> Hi kernel folks,
>>>
>>> I was wondering if there was a standard location to see TCP socket
>>> options (eg, nodelay, cork, etc), perhaps via procfs or some other
>>> means? I'd like to check whether arbitrary apps (for which I don't
>>> have
>>> code) are using particular TCP options.

> the SystemTap Networking Tapset provides a tcp.setsockopt breakpoint which I can use.
> Mike

Here's the tap I used (included for anyone reading on a list archive if there's still no /proc implementation):

sockettest.stap
# Show sockets setting options
probe begin
{
print ("\nChecking for apps making socket calls\n")
}
probe tcp.setsockopt
{
printf (" App '%s' (PID %d) set socket with args %s \n", execname(), pid(), optstr)
}

Mike

===============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
===============================================================================

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/