Linux:

netstat -nltp

Mac:

lsof -i tcp:port



端口使用状况小计:

Port Application Path
8000 makeServer.py /home/lane/wx-globe
2603 server.py /home/lane/Mmrz-Sync/server
4496 lhsjlc4.rb /home/lane/lhsjlc4
5969 bingAPI.rb /home/lane/tools-lite/ruby
3322 returnAddr.rb /home/lane/tools-lite/ruby
2333 huaji.rb /home/lane/huaji
2016-11-04 18:036