From owner-freebsd-questions@FreeBSD.ORG Sun Apr 10 21:36:51 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56E1416A4CE for ; Sun, 10 Apr 2005 21:36:51 +0000 (GMT) Received: from smtp.knology.net (smtp.knology.net [24.214.63.101]) by mx1.FreeBSD.org (Postfix) with SMTP id ADBB643D54 for ; Sun, 10 Apr 2005 21:36:47 +0000 (GMT) (envelope-from dkelly@Grumpy.DynDNS.org) Received: (qmail 27983 invoked by uid 0); 10 Apr 2005 21:36:46 -0000 Received: from user-69-73-60-132.knology.net (HELO Grumpy.DynDNS.org) (69.73.60.132) by smtp1.knology.net with SMTP; 10 Apr 2005 21:36:46 -0000 Received: by Grumpy.DynDNS.org (Postfix, from userid 928) id 0AC9862BB; Sun, 10 Apr 2005 16:36:46 -0500 (CDT) Date: Sun, 10 Apr 2005 16:36:46 -0500 From: David Kelly To: freebsd-questions@freebsd.org Message-ID: <20050410213645.GA27742@Grumpy.DynDNS.org> References: <20050410211318.GP23009@weller-fahy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050410211318.GP23009@weller-fahy.com> User-Agent: Mutt/1.4.2.1i Subject: Re: Question about processes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2005 21:36:51 -0000 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.