linux
1、 netstat -tlnp 查看端口情况
2、netstat -tlnp | grep 30227 筛选 查看30227端口
3、lsof -i :80 查看80端口
windows
1、netstat -aon|findstr "30316"
C:\Users\xxx>netstat -aon|findstr "30316"
TCP 0.0.0.0:30316 0.0.0.0:0 LISTENING 6340
TCP [::]:30316 [::]:0 LISTENING 6340
2、tskill 6340 杀死进程
或者 taskkill /pid 6340 -t -f