Re: tcp connection state information
Re: tcp connection state information
- Subject: Re: tcp connection state information
- From: "Justin C. Walker" <email@hidden>
- Date: Wed, 04 Jun 2008 21:25:58 -0700
On Jun 4, 2008, at 19:09 , Tom Gissel wrote:
Is there a way to list all the connections and the state for a
particular port/socket? Specifically I'm interested in getting the
information for TCP connections and seeing what state those
connections are in LISTEN/ESTABLISHED/TIME_WAIT/etc, like netstat/
lsof display. I realize that I could execute either these commands
and parse the output but both commands have prohibitive cost
associated with them. lsof is particularlly slow, on my 2.6 gz
macbookpro "lsof -F -i tcp:8081" takes it ~1.187 seconds to execute.
netstat is significantly faster, especially with the -n option, so
it must be doing a lot less work...
Is there a reason you don't look at the 'netstat' source?
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Director
Institute for the Enhancement of the Director's Income
--------
"Weaseling out of things is what separates us from the animals.
Well, except the weasel."
- Homer J Simpson
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden