From owner-freebsd-questions@FreeBSD.ORG Sat Jan 13 00:49:15 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 884E916A47B for ; Sat, 13 Jan 2007 00:49:15 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout1.cac.washington.edu (mxout1.cac.washington.edu [140.142.32.134]) by mx1.freebsd.org (Postfix) with ESMTP id 6674A13C455 for ; Sat, 13 Jan 2007 00:49:15 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9] (may be forged)) by mxout1.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id l0D0nExR024867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 12 Jan 2007 16:49:15 -0800 X-Auth-Received: from [192.168.0.101] (dsl254-013-145.sea1.dsl.speakeasy.net [216.254.13.145]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id l0D0nE0B004813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 12 Jan 2007 16:49:14 -0800 Message-ID: <45A82C89.1030505@u.washington.edu> Date: Fri, 12 Jan 2007 16:49:13 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.9 (X11/20070109) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: In-Reply-To: X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.1.12.163433 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __LINES_OF_YELLING 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: who's using that port? 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: Sat, 13 Jan 2007 00:49:15 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Michael P. Soulier wrote: > I came home tonight to find my server with a full /var partition due > to httpd-error.log being very full of error messages. I cleaned it up, > and restarted apache to find that it wouldn't bind to ports 80 and 443 > as they were in use. > > netstat -na confirmed that they were, but not by who. There's no -p > argument to track the pid of the process using the port. > > How do you track that on BSD? > > Thanks, > Mike sysutils/lsof is helpful in this case. Just grep for the port number you are looking for. Make sure to run it as root though or it will only show a limited number of open filehandles. - -Garrett -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.1 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFqCyJEnKyINQw/HARAv/xAKCrodPnZo1E0RbZxlrAl5scOEBbyQCfSNVr yF85leoq+J2yCendJHvbuEo= =AdFg -----END PGP SIGNATURE-----