目录
一、netstat -anp tcp -v | grep 80
二、lsof -P -n -i:8080
一、netstat -anp tcp -v | grep 80
➜ Downloads netstat -anp tcp -v | grep 80
tcp46 0 0 *.8080 *.* LISTEN 131072 131072 25252 0 0x0000 0x00000006
tcp4 0 0 127.0.0.1.57643 127.0.0.1.57644 ESTABLISHED 348054 146988 447 0 0x0002 0x00000000
tcp4 0 0 192.168.23.200.57501 221.194.131.180.443 ESTABLISHED 131072 131098 574 0 0x0102 0x00000008
tcp4 0 0 192.168.23.200.56801 114.112.207.1.443 ESTABLISHED 131072 131072 1299 0 0x0102 0x00020000
tcp4 0 0 192.168.23.200.53855 221.194.131.180.443 ESTABLISHED 131072 131072 10005 0 0x0102 0x00000000
tcp4 0 0 127.0.0.1.49153 *.* LISTEN 131072 131072 103 0 0x0180 0x00000002
tcp4 0 0 127.0.0.1.29754 *.* LISTEN 131072 131072 103 0 0x0080 0x00000006
tcp46 0 0 *.49152 *.* LISTEN 131072 131072 1 0 0x0180 0x00000006
tcp4 0 0 127.0.0.1.57642 127.0.0.1.63543 TIME_WAIT 407808 146988 25246 0 0x2131 0x00000008
二、lsof -P -n -i:8080
➜ Downloads lsof -P -n -i:8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 25252 cmcc 277u IPv6 0xb2057debfdfb9f41 0t0 TCP *:8080 (LISTEN)