Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Apr 2005 16:36:46 -0500
From:      David Kelly <dkelly@hiwaay.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Question about processes
Message-ID:  <20050410213645.GA27742@Grumpy.DynDNS.org>
In-Reply-To: <20050410211318.GP23009@weller-fahy.com>
References:  <20050410211318.GP23009@weller-fahy.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050410213645.GA27742>