From owner-freebsd-questions@FreeBSD.ORG Wed May 9 14:40: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 D9D1B16A404 for ; Wed, 9 May 2007 14:40:15 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.184]) by mx1.freebsd.org (Postfix) with ESMTP id 3E2C013C4BF for ; Wed, 9 May 2007 14:40:14 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: by mu-out-0910.google.com with SMTP id w9so126420mue for ; Wed, 09 May 2007 07:40:13 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=A4jLj+p/j3L+LESbMiZ/21MWNYcBuA4KDrQPtPhRHku+jP2GbYf+gSw/HKhcXXgpCaCGVFARcb6riI7IPTJRxXfuOZIIvHZejR+q4Re1p4fNqgxjDCgZ+lFE6hfBJNWhaoirssC6MufBpUxXI6XgvBhlZFDMzmvtaUENao4IBKw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=Zt8szWqYoSq0sDXbfWixphcwoSc5alqKl0VUTJIKHEsMW5O4CJbKpK2siWZ7eZQzW5RcC1ngjoYg6/qVbmowqGbTeNKGEUZYFMrxt1pAcKwpLgS28MFWrUjkkxVVpzrKMwKup15lBlthtz8HkA/rJnSOLcWkDmN5OJFL5z+B3Z4= Received: by 10.82.151.14 with SMTP id y14mr1124604bud.1178721613320; Wed, 09 May 2007 07:40:13 -0700 (PDT) Received: from ?IPv6:::ffff:127.0.0.1? ( [217.206.187.79]) by mx.google.com with ESMTP id c24sm6297942ika.2007.05.09.07.40.11; Wed, 09 May 2007 07:40:11 -0700 (PDT) From: Tom Evans To: Bob Johnson In-Reply-To: <54db43990704111152w13707e45n1e0b6f436b69dc51@mail.gmail.com> References: <461A5D9E.2010501@aeternal.net> <200704101000.03164.jonathan@hst.org.za> <54db43990704111152w13707e45n1e0b6f436b69dc51@mail.gmail.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-k4+TELu9WjRFFdt2hhTL" Date: Wed, 09 May 2007 15:40:10 +0100 Message-Id: <1178721610.1231.17.camel@zoot.mintel.co.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.10.0 FreeBSD GNOME Team Port Cc: Jonathan McKeown , freebsd-questions@freebsd.org Subject: Re: command to inentify the process that is listening in a 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: Wed, 09 May 2007 14:40:15 -0000 --=-k4+TELu9WjRFFdt2hhTL Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2007-04-11 at 14:52 -0400, Bob Johnson wrote: > On 4/10/07, Jonathan McKeown wrote: > > On Monday 09 April 2007 17:37, Martin Hudec wrote: > > > Siju George wrote: > > > > How Do you actually Identify what process is listening on a TCP/IP = port? > > > > "nmap" does not usually give the right answer. > > > > There should be some command that can be run on the local host for > > > > identification right? > > > > > > man lsof > > > > > > 5:35pm [amber] ~# lsof -i @localhost:123 > > > COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME > > > ntpd 552 root 10u IPv4 0xc4c46000 0t0 UDP localhost:ntp > > > > Just out of interest, why do so many people recommend lsof, which is a = port, > > when sockstat/fstat are in the base system and seem to cover the same > > ground? > > Am I missing something about lsof? >=20 > Linux systems don't have sockstat, so people who got to FreeBSD via > Linux are used to lsof and they tend to continue using it. Same result > for those who read the many Linux howto websites. >=20 > - Bob > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" Ironically, coming from linux I found that FreeBSD netstat doesn't support the -l -4 flags, which is how I found out about sockstat -l4 :) Tom --=-k4+TELu9WjRFFdt2hhTL Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBGQd1HlcRvFfyds/cRAjmiAKCA4QJAarH9iozE/YS55XlZAvymhACeOxr+ l5JmAxJcM6tBgsYrOho77Cc= =FMfv -----END PGP SIGNATURE----- --=-k4+TELu9WjRFFdt2hhTL--