Akagi201
11/26/2015 - 9:53 AM

devops.md

mac上查看端口对应PID

  • lsof -n -i4TCP:$PORT | grep LISTEN
  • lsof -Pnl +M -i4 | grep $PORT
  • lsof -i -n -P | grep TCP

linux上查看端口对应PID

  • netstat -antp | grep $PORT