Bomi
分类: 系统运维
2012-02-05 00:28:40
想要查看 OpenSolaris下的端口使用情况,可用 sunfreeware.com 上的 lsof。
下载:
解压缩后,bash-3.2# pkgadd -d ./lsof_0508-4.80-sol10-x86-local
即可安装该软件包。
使用方法如下:lsof -i TCP: port
例子:
bash-3.2# lsof -i TCP:80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
httpd 583 root 256u IPv4 0xffffff01504f2500 0t0 TCP *:80 (UknownState_-359969560)
httpd 585 webservd 256u IPv4 0xffffff01504f2500 0t0 TCP *:80 (UknownState_-359969560)
httpd 586 webservd 256u IPv4 0xffffff01504f2500 0t0 TCP *:80 (UknownState_-359969560)
httpd 587 webservd 256u IPv4 0xffffff01504f2500 0t0 TCP *:80 (UknownState_-359969560)
httpd 588 webservd 256u IPv4 0xffffff01504f2500 0t0 TCP *:80 (UknownState_-359969560)
httpd 589 webservd 256u IPv4 0xffffff01504f2500 0t0 TCP *:80 (UknownState_-359969560)
bash-3.2#