Re: Program to display process information (especially sockets)

From: Frank Gevaerts (
Date: 12/26/04

  • Next message: Eugen Leitl: "Re: Linux Functionality?"
    Date: Sun, 26 Dec 2004 13:48:14 +0100

    On Sun, Dec 26, 2004 at 11:28:35PM +1100, Sam Watkins wrote:
    > On Sun, 2004-12-26 at 15:19 +0700, David Garamond wrote:
    > > Anyone knows of a program (command-line or GUI) to display process
    > > information, e.g. which TCP/UDP/Unix sockets are used by the process
    > > and what are their ports/hosts/etc.
    > Probably the best you're going to get is the output of netstat -p.
    > This will tell you process names and numbers for each socket, you can
    > parse that and do what you like with it. If you need it to spit out the
    > info faster, try the -n option, which won't do reverse dns lookups.
    > One thing I would like to know how to do, but I don't think it's
    > possible, is to find out what process is on the other end of a pipe.
    > If that were possible, I could write a graphical system display tool,
    > that shows you all your processes and how they're connected together.

    Try lsof.

    > --
    > To UNSUBSCRIBE, email to
    > with a subject of "unsubscribe". Trouble? Contact

    "Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are,
    by definition, not smart enough to debug it." - Brian W. Kernighan
    To UNSUBSCRIBE, email to 
    with a subject of "unsubscribe". Trouble? Contact

  • Next message: Eugen Leitl: "Re: Linux Functionality?"

    Relevant Pages

    • Re: listen port 0?
      ... do or do not gather and interpret socket stream data. ... The IDLE state that lsof reports is an important clue. ... socket stream has been opened, ...
    • Re: Has my server been hacked?
      ... netstat and/or lsof which will mask the rooter payload. ... xinetd services. ...
    • Re: Re: FC7 and Apache wont start
      ... Here is the screen showing "lsof" first and then netstat. ... Active Internet connections (servers and established) ... have identical owners/groups permissions so there shouldn't a permissions problem for the logfiles. ...
    • Re: What triggers "No Buffer Space Available"?
      ... There are actually two "layers" associated with each socket -- the IPC object and the protocol control block. ... The behaviors of netstat and sockstat are quite different, even though the output is similar: netstat walks the protocol-layer connection lists and prints information about them. ...
    • Re: NFS inconsistent behaviour
      ... Sorry Frank I couldnt check your response due to non availability of machine. ... Try "netstat -t", when the problem occurs. ... show a lot tcp connections in state TIME_WAIT. ...