Professional Web Applications Themes

Question about processes - FreeBSD

How does one determine which process initiated any given network connection? Or which program (on disk) initiated the process that initiated the network connection? Been searching, but not finding. Regards, -- dave [ please don't CC me ]...

  1. #1

    Default Question about processes

    How does one determine which process initiated any given network
    connection? Or which program (on disk) initiated the process that
    initiated the network connection?

    Been searching, but not finding.

    Regards,
    --
    dave [ please don't CC me ]
    David Guest

  2. #2

    Default Re: Question about processes

    On Sunday 10 April 2005 23:13, David J. Weller-Fahy wrote: 

    sockstat will show you all network and unix sockets and the processes and
    their PIDs. If you want to know more such as the full path or so (if used
    when invoked), you can run ps wwwaux and grep on the PID.

    HTH,

    Dan

    Danny Guest

  3. #3

    Default Re: Question about processes

    On Sun, Apr 10, 2005 at 11:13:40PM +0200, David J. Weller-Fahy wrote: 

    Read the man page for ps, specifically "ps -j" and variations of. What
    you are looking for is the ppid, Parent Process ID. Might find a process
    was started by inetd this way.

    netstat is the other tool you are looking for, to list open connections.

    The proc filesystem may also help associate open connections with
    running processes. man procfs.

    --
    David Kelly N4HHE, net
    ================================================== ======================
    Whom computers would destroy, they must first drive mad.
    David Guest

  4. #4

    Default Re: Question about processes

    * Danny Pansters <com> [2005-04-10 23:26 +0200]: 

    That's exactly what I was looking for, Thanks!

    * David Kelly <net> [2005-04-10 23:37 +0200]: 

    I've tried netstat before, no luck - it shows open connections, but I
    was never able to get the process/program from it. I had skimmed the ps
    man page, but not read through it thoroughly - I'll rectify that. ;]

    Regards,
    --
    dave [ please don't CC me ]
    David Guest

Similar Threads

  1. Replies: 3
    Last Post: February 14th, 08:47 AM
  2. Replies: 3
    Last Post: December 10th, 08:29 PM
  3. Replies: 31
    Last Post: December 9th, 11:06 PM
  4. 4GB VM for 32 bit processes
    By Manish in forum UNIX Programming
    Replies: 24
    Last Post: September 9th, 12:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139