LinuxSA Mailing list archives
Index:
[thread]
[date]
[subject]
[author]
[stats]
From: Alan Kennington <akenning@dog.topology.org>
To : LinuxSA <linuxsa@linuxsa.org.au>
Date: Wed, 28 Feb 2001 01:00:06 +1030
how to list TCP ports opened by a process?
Can anyone remind me how to list all of the TCP sockets
opened by a given process?
I used to know hwo to do this, because I used it once to
verify that "sshd" was leaving up to 250 sockets open at a time,
which then caused it to fail.
The tools I've tried are "netstat", "fuser" and "lsof"
with various parameters. All I can get is a complete list
of files opened by a process, or the list of processes which
are listening on a given port, and so forth.
What I really wanted was something that could give me a list
like
sshd pid=....
sockets = 22 22 22 22 22 22 ....
I.e. I want it to show an item for each open socket.
By the way, now that I've upgraded to OpenSSH 2.3.0 on
my old RH 5.2 machine, the "lingering sockets" problem
seems to have disappeared, because my "sshd" hasn't run out
of sockets for a very long time.
But I want to be certain that it is releasing sockets
correctly by using some tool to show the open sockets.
"lsof", strangely, seems to only show a small subset of
the total set of open TCP sockets, although it gives a
stunning list of open file sockets, and pipes, unix sockets,
etc. etc. etc.
Cheers, and thanks in advance,
Alan Kennington.
--
LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
Index:
[thread]
[date]
[subject]
[author]
[stats]
Return to the LinuxSA Mailing List Information Page