Home > database >  netstat process details with the IP address
netstat process details with the IP address

Time:10-13

My netstat command is as below on the Centos machine

#netstat -n | grep 172.18.0.6 | more
tcp        0      0 172.18.0.1:57332        172.18.0.6:8444         FIN_WAIT2  

I want to find out which process is running with the IP address 172.18.0.1 . Any way to find out the same

CodePudding user response:

I think you are looking for the netstat -p option.

#netstat -np | grep 172.18.0.6 | more

Should work.

CodePudding user response:

You can use lsof.

If you want to see which service is running in port 57332:

lsof -i TCP:57332

or by IP:

lsof -i |grep 172.18.0.1

CodePudding user response:

You can use

netstat -apn | grep 172.18.0.6 | more

to get also the sockets that are listening.

  • Related