rmsock除去不包含文件描述符的套接字。它接受 socket、tcpcb、inpcb、ripcb 或 rawcb 地址并将其转换成套接字地址。然后检查每个进程所有打开的文件以查找套接字的匹配。如果没找到匹配,对该套接字执行异常终止操作,而不考虑套接字 linger 选项的存在。套接字保留的端口号释放。如果发现匹配,文件描述符和主进程状态显示给用户。
命令格式:rmsock Address TypeofAddress
$ netstat -Aan|grep 10200
f1000e000886cbb8 tcp4 0 0 10.252.26.138.39158 10.252.26.135.10200 ESTABLISHED
f1000e000de663b8 tcp4 0 0 10.252.26.138.40377 10.252.26.136.10200 ESTABLISHED
f1000e000e1273b8 tcp4 0 0 10.252.26.138.48702 10.252.26.134.10200 ESTABLISHED
f1000e003583ebb8 tcp4 0 0 10.252.26.138.50757 10.252.26.137.10200 ESTABLISHED
f1000e000873ebb8 tcp4 0 0 10.252.26.138.34925 10.252.26.84.10200 ESTABLISHED
f1000e002f96d3b8 tcp4 0 0 10.252.26.138.36450 10.252.26.83.10200 ESTABLISHED
$ rmsock f1000e000de663b8 tcpcb
The socket 0xf1000e000de66008 is being held by proccess 7864454 (cclclnt).
$ ps -ef|grep 7864454|grep -v grep
hwcrm 7864454 1 1 Aug 28 - 2267:59 cclclnt
阅读(3306) | 评论(0) | 转发(0) |