From owner-freebsd-questions@FreeBSD.ORG Sun Nov 18 01:55:05 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 026F116A418 for ; Sun, 18 Nov 2007 01:55:05 +0000 (UTC) (envelope-from chuckr@chuckr.org) Received: from mail7.sea5.speakeasy.net (mail7.sea5.speakeasy.net [69.17.117.9]) by mx1.freebsd.org (Postfix) with ESMTP id D55F713C465 for ; Sun, 18 Nov 2007 01:55:04 +0000 (UTC) (envelope-from chuckr@chuckr.org) Received: (qmail 21049 invoked from network); 18 Nov 2007 01:54:46 -0000 Received: from april.chuckr.org (chuckr@[66.92.151.30]) (envelope-sender ) by mail7.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 18 Nov 2007 01:54:46 -0000 Message-ID: <473F9B1E.5010805@chuckr.org> Date: Sat, 17 Nov 2007 20:53:34 -0500 From: Chuck Robey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.9) Gecko/20071107 SeaMonkey/1.1.6 MIME-Version: 1.0 To: Tino Engel References: <1195154430.473c9bfef18f0@webmail.rawbw.com> <20071117140449.GA7094@rebelion.Sisis.de> <473F453D.5020806@web.de> In-Reply-To: <473F453D.5020806@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Yuri , Matthias Apitz , 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 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Nov 2007 01:55:05 -0000 Tino Engel wrote: > Matthias Apitz schrieb: >> 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 >> > ps -Al show the parent PID of each process. I just moved from Linux, where the netstat does supply the info you're asking, and it took me a little time to find out that sockstat is where the info is, in FreeBSD. Try sockstat. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"