rmsock除去不包含文件描述符的套接字。它接受 socket、tcpcb、inpcb、ripcb 或 rawcb 地址并将其转换成套接字地址。然后检查每个进程所有打开的文件以查找套接字的匹配。如果没找到匹配,对该套接字执行异常终止操作,而不考虑套接字 linger 选项的存在。套接字保留的端口号释放。如果发现匹配,文件描述符和主进程状态显示给用户。
命令格式:rmsock Address TypeofAddress
[zwq:/]
netstat
-Aan|
grep
6200|
grep
LISTEN
f1000e0000307bb0 tcp4 0 0 *.6200 *.* LISTEN
--f1000e0000307bb0 为系统内核地址
[zwq:/]rmsock f1000e0000307bb0 tcpcb
The socket 0x307808 is being held by proccess 5701830 (ons).
[zwq:/]
ps
-ef|
grep
5701830|
grep
-
v
grep
oracle10 5701830 5112098 0 Apr 21 - 7:17
/oracle10/app/product/crs/10
.2.0
/opmn/bin/ons
-d
|