Question about processes

2005-04-10 Thread David J. Weller-Fahy
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 ]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Question about processes

2005-04-10 Thread Danny Pansters
On Sunday 10 April 2005 23:13, David J. Weller-Fahy wrote:
 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,

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

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Question about processes

2005-04-10 Thread David Kelly
On Sun, Apr 10, 2005 at 11:13:40PM +0200, David J. Weller-Fahy wrote:
 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.

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, [EMAIL PROTECTED]

Whom computers would destroy, they must first drive mad.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Question about processes

2005-04-10 Thread David J. Weller-Fahy
* Danny Pansters [EMAIL PROTECTED] [2005-04-10 23:26 +0200]:
 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.

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

* David Kelly [EMAIL PROTECTED] [2005-04-10 23:37 +0200]:
 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.

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 ]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]