Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Nov 2007 15:04:49 +0100
From:      Matthias Apitz <m.apitz@oclcpica.org>
To:        Yuri <yuri@rawbw.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to know PID responsible for network connection/listen?
Message-ID:  <20071117140449.GA7094@rebelion.Sisis.de>
In-Reply-To: <1195154430.473c9bfef18f0@webmail.rawbw.com>
References:  <1195154430.473c9bfef18f0@webmail.rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
El día Thursday, November 15, 2007 a las 11:20:30AM -0800, Yuri escribió:

> 'netstat -a' gives me the listing of network connection/listening records.
> But there's no link to the process id that opened it.
> With lots of processes this can be a significant problem to figure out who
> opened which connection.

For example, for the port 25 you see it with:

# lsof -P | fgrep :25
sendmail  6462  root    3u    IPv4 0xc5c3ecb0        0t0     TCP localhost:25 (LISTEN)

i.e. the PID is 6462

HIH

	matthias
-- 
Matthias Apitz
Manager Technical Support - OCLC PICA GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <m.apitz@oclcpica.org> - w http://www.oclcpica.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/



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