From owner-freebsd-questions@FreeBSD.ORG Sat Nov 17 14:05:58 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EAFC16A468 for ; Sat, 17 Nov 2007 14:05:58 +0000 (UTC) (envelope-from m.apitz@oclcpica.org) Received: from hunter.Sisis.de (hunter.sisis.de [193.31.11.194]) by mx1.freebsd.org (Postfix) with ESMTP id 8832C13C46A for ; Sat, 17 Nov 2007 14:05:56 +0000 (UTC) (envelope-from m.apitz@oclcpica.org) Received: (from mail@localhost) by hunter.Sisis.de (8.8.8/8.8.8) id OAA04291; Sat, 17 Nov 2007 14:59:04 +0100 (CET) (envelope-from m.apitz@oclcpica.org) Received: from ppp-82-135-76-181.dynamic.mnet-online.de(82.135.76.181) by hunter.Sisis.de via smap (V2.1) id xma004274; Sat, 17 Nov 07 14:58:37 +0100 Received: (from guru@localhost) by rebelion.Sisis.de (8.13.8/8.13.8/Submit) id lAHE4nWR007316; Sat, 17 Nov 2007 15:04:49 +0100 (CET) (envelope-from m.apitz@oclcpica.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to m.apitz@oclcpica.org using -f Date: Sat, 17 Nov 2007 15:04:49 +0100 From: Matthias Apitz To: Yuri Message-ID: <20071117140449.GA7094@rebelion.Sisis.de> References: <1195154430.473c9bfef18f0@webmail.rawbw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1195154430.473c9bfef18f0@webmail.rawbw.com> User-Agent: Mutt/1.4.2.2i X-Operating-System: FreeBSD 6.2-RELEASE (i386) Cc: freebsd-questions@freebsd.org Subject: Re: How to know PID responsible for network connection/listen? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Nov 2007 14:05:58 -0000 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 - w http://www.oclcpica.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/