From owner-freebsd-questions Wed Jun 19 5:17:35 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id A136137B40E for ; Wed, 19 Jun 2002 05:17:30 -0700 (PDT) Received: from hades.hell.gr (patr530-a203.otenet.gr [212.205.215.203]) by mailsrv.otenet.gr (8.12.3/8.12.3) with ESMTP id g5JCHPqK000167; Wed, 19 Jun 2002 15:17:26 +0300 (EEST) Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.4/8.12.4) with ESMTP id g5JCH24B047754; Wed, 19 Jun 2002 15:17:02 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from charon@localhost) by hades.hell.gr (8.12.4/8.12.4/Submit) id g5JCH2Db047753; Wed, 19 Jun 2002 15:17:02 +0300 (EEST) X-Authentication-Warning: hades.hell.gr: charon set sender to keramida@ceid.upatras.gr using -f Date: Wed, 19 Jun 2002 15:17:02 +0300 From: Giorgos Keramidas To: Varshavchick Alexander Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Getting pid of listening process Message-ID: <20020619121702.GB45894@hades.hell.gr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-06-19 11:37 +0000, Varshavchick Alexander wrote: > Hi gurus, > > can anybody make a hint as how pid of a process listening on a specified > tcp port can be determined? $ sockstat -l4 | grep ':25 ' | awk '{print $3}' 21401 493 $ ps xa | grep 21401 | grep -v grep 21401 ?? Ss 0:06.14 sendmail: accepting connections (sendmail) $ ps xa | grep 493 | grep -v grep 493 ?? Ss 0:09.91 sendmail: accepting connections (sendmail) - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message