Unix Programming - How to see the options on an open socket

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2004 > How to see the options on an open socket





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to see the options on an open socket
Chris Breemer

2004-01-23, 4:57 pm

Sorry if this question is OT, but I could not find a more
appropriate newsgroup.

Is there a tool that can show me the socket options that have
been set (or are being set) on an open socket ? I am particulary
interested to see whether or not Sybase client software sets
TCP_NODELAY on the connection socket for a remote database.
Have had no luck so far with lsof and Ethereal.

Any tips would be appreciated.
TIA
Chris
Mark A. Odell

2004-01-23, 4:57 pm

chris_breemer@nl.compuware.com (Chris Breemer) wrote in
news:d62022e4.0311200805.41f82b5c@posting.google.com:
quote:

> Sorry if this question is OT, but I could not find a more
> appropriate newsgroup.
>
> Is there a tool that can show me the socket options that have
> been set (or are being set) on an open socket ? I am particulary
> interested to see whether or not Sybase client software sets
> TCP_NODELAY on the connection socket for a remote database.
> Have had no luck so far with lsof and Ethereal.



Does strace help?

--
- Mark ->
--
Mark A. Odell

2004-01-23, 4:57 pm

chris_breemer@nl.compuware.com (Chris Breemer) wrote in
news:d62022e4.0311200805.41f82b5c@posting.google.com:
quote:

> Sorry if this question is OT, but I could not find a more
> appropriate newsgroup.
>
> Is there a tool that can show me the socket options that have
> been set (or are being set) on an open socket ? I am particulary
> interested to see whether or not Sybase client software sets
> TCP_NODELAY on the connection socket for a remote database.
> Have had no luck so far with lsof and Ethereal.



Does strace help?

--
- Mark ->
--
Vic Abell

2004-01-23, 4:57 pm

chris_breemer@nl.compuware.com (Chris Breemer) wrote in message news:<d62022e4.0311200805.41f82b5c@posting.google.com>...
quote:

> Sorry if this question is OT, but I could not find a more
> appropriate newsgroup.
>
> Is there a tool that can show me the socket options that have
> been set (or are being set) on an open socket ? I am particulary
> interested to see whether or not Sybase client software sets
> TCP_NODELAY on the connection socket for a remote database.
> Have had no luck so far with lsof and Ethereal.
>
> Any tips would be appreciated.



For many UNIX dialects it is a trivial matter to modify the
lsof source code to report almost anything of interest the
socket structure contains. I've done that for TCP_NODELAY
for Solaris lsof and will send that patch in response to an
e-mail request for it.

Vic Abell, lsof author <abe@purdue.edu>
Vic Abell

2004-01-23, 4:57 pm

chris_breemer@nl.compuware.com (Chris Breemer) wrote in message news:<d62022e4.0311200805.41f82b5c@posting.google.com>...
quote:

> Sorry if this question is OT, but I could not find a more
> appropriate newsgroup.
>
> Is there a tool that can show me the socket options that have
> been set (or are being set) on an open socket ? I am particulary
> interested to see whether or not Sybase client software sets
> TCP_NODELAY on the connection socket for a remote database.
> Have had no luck so far with lsof and Ethereal.
>
> Any tips would be appreciated.



For many UNIX dialects it is a trivial matter to modify the
lsof source code to report almost anything of interest the
socket structure contains. I've done that for TCP_NODELAY
for Solaris lsof and will send that patch in response to an
e-mail request for it.

Vic Abell, lsof author <abe@purdue.edu>
Chris Breemer

2004-01-23, 4:58 pm

"Mark A. Odell" <nospam@embeddedfw.com> wrote in message news:<Xns94397972FAE7ACopyrightMarkOdell@130.133.1.4>...
quote:

> chris_breemer@nl.compuware.com (Chris Breemer) wrote in
> news:d62022e4.0311200805.41f82b5c@posting.google.com:
>
>
> Does strace help?



Probably. I know truss shows the setting of socket options and
strace probably does too. But I have not always control about the
creating process and would prefer a tool that just looks, not
monitors. Thanks for the reply though !

Cheers
Chris
Chris Breemer

2004-01-23, 4:58 pm

"Mark A. Odell" <nospam@embeddedfw.com> wrote in message news:<Xns94397972FAE7ACopyrightMarkOdell@130.133.1.4>...
quote:

> chris_breemer@nl.compuware.com (Chris Breemer) wrote in
> news:d62022e4.0311200805.41f82b5c@posting.google.com:
>
>
> Does strace help?



Probably. I know truss shows the setting of socket options and
strace probably does too. But I have not always control about the
creating process and would prefer a tool that just looks, not
monitors. Thanks for the reply though !

Cheers
Chris
Chris Breemer

2004-01-23, 4:58 pm

Hi Vic,

Great to hear you're still working on lsof !

As TCP_NODELAY can be crucial for performance this would
be a very nice enhancement to my toolbox, so I'd appreciate
a copy of this patch. Will send you a separate email request
for it. Thanks a bunch !

Cheers

Chris

abe@purdue.edu (Vic Abell) wrote in message news:<825ee26b.0311201436.48a0bea2@posting.google.com>...
quote:

> chris_breemer@nl.compuware.com (Chris Breemer) wrote in message news:<d62022e4.0311200805.41f82b5c@posting.google.com>...
>
> For many UNIX dialects it is a trivial matter to modify the
> lsof source code to report almost anything of interest the
> socket structure contains. I've done that for TCP_NODELAY
> for Solaris lsof and will send that patch in response to an
> e-mail request for it.
>
> Vic Abell, lsof author <abe@purdue.edu>


Chris Breemer

2004-01-23, 4:58 pm

Hi Vic,

Great to hear you're still working on lsof !

As TCP_NODELAY can be crucial for performance this would
be a very nice enhancement to my toolbox, so I'd appreciate
a copy of this patch. Will send you a separate email request
for it. Thanks a bunch !

Cheers

Chris

abe@purdue.edu (Vic Abell) wrote in message news:<825ee26b.0311201436.48a0bea2@posting.google.com>...
quote:

> chris_breemer@nl.compuware.com (Chris Breemer) wrote in message news:<d62022e4.0311200805.41f82b5c@posting.google.com>...
>
> For many UNIX dialects it is a trivial matter to modify the
> lsof source code to report almost anything of interest the
> socket structure contains. I've done that for TCP_NODELAY
> for Solaris lsof and will send that patch in response to an
> e-mail request for it.
>
> Vic Abell, lsof author <abe@purdue.edu>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com