From owner-freebsd-hackers Wed Jun 19 5:48: 2 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from Danovitsch.dnsq.org (b74143.upc-b.chello.nl [212.83.74.143]) by hub.freebsd.org (Postfix) with ESMTP id 5359637B40A for ; Wed, 19 Jun 2002 05:47:59 -0700 (PDT) Received: from FreeBSD.Danovitsch.LAN (b83007.upc-b.chello.nl [212.83.83.7]) by Danovitsch.dnsq.org (8.11.3/8.11.3) with SMTP id g5JCkIO56276; Wed, 19 Jun 2002 14:46:18 +0200 (CEST) (envelope-from Danovitsch@Danovitsch.dnsq.org) Content-Type: text/plain; charset="iso-8859-1" From: "Daan Vreeken [PA4DAN]" Reply-To: Danovitsch@Danovitsch.dnsq.org To: Varshavchick Alexander Subject: Re: Getting pid of listening process Date: Wed, 19 Jun 2002 14:56:34 +0200 X-Mailer: KMail [version 1.2] References: In-Reply-To: Cc: FreeBSD-Hackers@FreeBSD.org MIME-Version: 1.0 Message-Id: <02061914563400.02778@FreeBSD.Danovitsch.LAN> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wednesday 19 June 2002 09:48, you wrote: > Hi gurus, > > can anybody make a hint as how pid of a process listening on a specified > tcp port can be determined? Of cause there are major utilities like lsof > or sockstat but they gather a lot of extra information and work not too > fast. What I need ideally would be a small C program which outputs pid > given a port number as a parameter, can anybody help? Try : sockstat -4 grtz, Daan -- Control the lights in my room: http://www.Danovitsch.dnsq.org/webcam Moo, ]:8) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message