Categories
软件 [15]
Archives
February 2008 |
查看与进程关联之端口号guocongbin | 05/25 2007, 23:14
windows: netstat -ao Linux : netstat -lnp aix: lsof -i: <port> Comments61 Responses to “查看与进程关联之端口号”2 3 4 5 6 7 9 10 11 12 14 15 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 39 40 41 42 43 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 Add comment |
1. netstat -Aan | grep -i listen | grep
比如查找25999被哪个占用
# netstat -Aan | grep -i listen | grep 25999
71107de4 tcp4 0 0 *.25999 *.* LISTEN
2. 使用rmsock tcpcb ,别被这个命令吓倒,其实不是删除sock的
。参数就是第一步返回的那个十六进制地址。
# rmsock 71107de4 tcpcb
The socket 0x71107c00 is being held by proccess 49546 (sms_access_agent).
括弧写的就是进程名。 :cheers: