Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jun 2002 14:56:34 +0200
From:      "Daan Vreeken [PA4DAN]" <Danovitsch@Danovitsch.dnsq.org>
To:        Varshavchick Alexander <alex@metrocom.ru>
Cc:        FreeBSD-Hackers@FreeBSD.org
Subject:   Re: Getting pid of listening process
Message-ID:  <02061914563400.02778@FreeBSD.Danovitsch.LAN>
In-Reply-To: <Pine.GSO.4.21.0206191148420.7233-100000@apache.metrocom.ru>
References:  <Pine.GSO.4.21.0206191148420.7233-100000@apache.metrocom.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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