Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Apr 2007 14:52:04 -0400
From:      "Bob Johnson" <fbsdlists@gmail.com>
To:        "Jonathan McKeown" <jonathan@hst.org.za>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: command to inentify the process that is listening in a port.
Message-ID:  <54db43990704111152w13707e45n1e0b6f436b69dc51@mail.gmail.com>
In-Reply-To: <200704101000.03164.jonathan@hst.org.za>
References:  <b713df2c0704090758h59657b8csc7716d3fe1f91943@mail.gmail.com> <b713df2c0704090759t1abcc96bld4978bbedec38687@mail.gmail.com> <461A5D9E.2010501@aeternal.net> <200704101000.03164.jonathan@hst.org.za>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/10/07, Jonathan McKeown <jonathan@hst.org.za> 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?

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.

- Bob



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