# lsof -Pi :8400,8402
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
CvMountd 7274542 root 3u IPv4 0xf1000e0001772bb0 0t0 TCP localhost:45601->localhost:8402 (ESTABLISHED)
cvd 12976186 root 3u IPv4 0xf1000e00019a9bb0 0t0 TCP localhost:48901->localhost:8402 (ESTABLISHED)
cvd 12976186 root 5u IPv4 0xf1000e00001ccbb0 0t0 TCP *:8400 (LISTEN)
EvMgrC 13566052 root 3u IPv4 0xf1000e0000243bb0 0t0 TCP *:8402 (LISTEN)
EvMgrC 13566052 root 22u IPv4 0xf1000e00018c7bb0 0t0 TCP localhost:8402->localhost:48901 (ESTABLISHED)
EvMgrC 13566052 root 23u IPv4 0xf1000e0001766bb0 0t0 TCP localhost:8402->localhost:45601 (ESTABLISHED)
如果未安装''lsof'',请参阅下面的''rmsock''信息。
'FIN_WAIT_1',''FIN_WAIT_2'',''TIME_WAIT'或''CLOSING''状态的端口都可以被''rmsock'强行关闭。
运行以下命令以查找处于这些状态的端口并记下第一个值,然后在''rmsock'命令中使用该值来关闭端口:
# netstat -Aan | egrep 'WAIT|CLOSING'
f1000e000258d3b8 tcp 0 0 192.168.1.114.58420 192.168.1.115.23 FIN_WAIT_1
# rmsock f1000e000258d3b8 tcpcb
socket 0x258d008 is removed
请注意,不允许尝试''rmsock''处于其他状态的端口,但它会告诉您使用它的进程。 这可以用作''lsof''的方法来查看使用这个端口的进程:
# netstat -Aan | grep 8400
f1000e00001823b0 tcp4 0 0 *.8400 *.* LISTEN
# rmsock f1000e00001823b0 tcpcb
The socket 0x182008 is being held by proccess 6095070 (cvd).
# oslevel -r
7100-01
# lslpp -l xlC.rte
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
xlC.rte 13.1.2.0 COMMITTED IBM XL C++ Runtime for AIX
# lsvg -o (列出活动的卷组)
rootvg
# lsvg -l rootvg (列出rootvg卷组中的逻辑卷)
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
hd6 paging 2 2 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 2 2 1 open/syncd /
hd2 jfs2 31 31 1 open/syncd /usr
hd9var jfs2 4 4 1 open/syncd /var
hd3 jfs2 4 4 1 open/syncd /tmp
# lsvg -o | lsvg -li (列出所有活动卷组中的所有逻辑卷)
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
hd6 paging 2 2 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 2 2 1 open/syncd /
hd2 jfs2 31 31 1 open/syncd /usr
hd9var jfs2 4 4 1 open/syncd /var
hd3 jfs2 4 4 1 open/syncd /tmp
# lsdev -Cc tape
# cfgmgr -v
#lslpp -l(列出已安装的软件包)
# csum -h MD5 filename