[TriLUG] Connecting Ports and Servers
Brian McCullough
bdmc at buadh-brath.com
Wed Jul 24 13:52:26 EDT 2013
On Wed, Jul 24, 2013 at 01:48:54PM -0400, Brian Gerard wrote:
> On 7/24/13 12:31 PM, Brian McCullough wrote:
> >I am trying to determine what process is responsible for a Listening
> >Port in an AIX machine. When I use "netstat -aon" I get a lot of
> >information, but I don't seem to see a PID. The output looks something
> >like:
> <SNIP!>
> >
> >Any suggestions?
> >
> >Thanks,
> >Brian
>
> Do you have 'lsof'?
>
> sudo lsof -i TCP:<port>
>
> ...gives output like:
> bash$ sudo lsof -i TCP:22
> COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
> sshd 1584 root 3u IPv4 4793 0t0 TCP *:ssh (LISTEN)
> sshd 1584 root 4u IPv6 4795 0t0 TCP *:ssh (LISTEN)
Thank you, Brian.
Someone else pointed me at lsof, too. I have always used it for
filesystems, not ports. Interesting.
Brian
More information about the TriLUG
mailing list