Date: Wed, 19 Jun 2002 16:52:21 +0400 (MSD) From: Varshavchick Alexander <alex@metrocom.ru> To: Giorgos Keramidas <keramida@ceid.upatras.gr> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Getting pid of listening process Message-ID: <Pine.GSO.4.21.0206191652160.1090-100000@apache.metrocom.ru> In-Reply-To: <20020619121702.GB45894@hades.hell.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
yes, sockstat works, however not expecially fast, but it seems to solve the matter. I don't know why lsof hangs but considering sockstat working it's not important. Thanks for helping. Alexander Varshavchick, Metrocom Joint Stock Company Phone: (812)118-3322, 118-3115(fax) On Wed, 19 Jun 2002, Giorgos Keramidas wrote: > Date: Wed, 19 Jun 2002 15:17:02 +0300 > From: Giorgos Keramidas <keramida@ceid.upatras.gr> > To: Varshavchick Alexander <alex@metrocom.ru> > Cc: freebsd-questions@FreeBSD.ORG > Subject: Re: Getting pid of listening process > > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.21.0206191652160.1090-100000>