aix用命令查监听端口对应的进程
2016-03-09 10:07
387 查看
aix用命令查监听端口对应的进程
维护系统或检查到不明的端口自然要去查一下这个端口是由哪个进程来监听的
windows可以用命令netstat -ano来查端口对应的进程的pid.
aix却并不能,aix需要使用下面的命令过程:
PEKAX218:/>netstat -na|more
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 *.13 *.* LISTEN
tcp 0 0 *.21 *.* LISTEN
tcp4 0 0 *.22 *.* LISTEN
tcp 0 0 *.23 *.* LISTEN
tcp4 0 0 *.25 *.* LISTEN
tcp4 0 0 *.37 *.* LISTEN
tcp4 0 0 *.111 *.* LISTEN
tcp4 0 0 *.199 *.* LISTEN
tcp 0 0 *.512 *.* LISTEN
tcp 0 0 *.513 *.* LISTEN
tcp 0 0 *.514 *.* LISTEN
tcp4 0 0 *.657 *.* LISTEN
tcp4 0 0 *.1334 *.* LISTEN
tcp4 0 0 *.1521 *.* LISTEN
...
比方要查是哪个进程在监听1334端口
PEKAX218:/>netstat -Aan|grep 1334
f10002000043c398 tcp4 0 0 *.1334 *.* LISTEN
PEKAX218:/>rmsock f10002000043c398 tcpcb
The socket 0x43c008 is being held by proccess 217248 (writesrv).
PEKAX218:/>ps -ef|grep 217248
root 217248 159882 0 Jan 08 - 0:00 /usr/sbin/writesrv
维护系统或检查到不明的端口自然要去查一下这个端口是由哪个进程来监听的
windows可以用命令netstat -ano来查端口对应的进程的pid.
aix却并不能,aix需要使用下面的命令过程:
PEKAX218:/>netstat -na|more
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 *.13 *.* LISTEN
tcp 0 0 *.21 *.* LISTEN
tcp4 0 0 *.22 *.* LISTEN
tcp 0 0 *.23 *.* LISTEN
tcp4 0 0 *.25 *.* LISTEN
tcp4 0 0 *.37 *.* LISTEN
tcp4 0 0 *.111 *.* LISTEN
tcp4 0 0 *.199 *.* LISTEN
tcp 0 0 *.512 *.* LISTEN
tcp 0 0 *.513 *.* LISTEN
tcp 0 0 *.514 *.* LISTEN
tcp4 0 0 *.657 *.* LISTEN
tcp4 0 0 *.1334 *.* LISTEN
tcp4 0 0 *.1521 *.* LISTEN
...
比方要查是哪个进程在监听1334端口
PEKAX218:/>netstat -Aan|grep 1334
f10002000043c398 tcp4 0 0 *.1334 *.* LISTEN
PEKAX218:/>rmsock f10002000043c398 tcpcb
The socket 0x43c008 is being held by proccess 217248 (writesrv).
PEKAX218:/>ps -ef|grep 217248
root 217248 159882 0 Jan 08 - 0:00 /usr/sbin/writesrv
相关文章推荐
- BC31pairs&&hdoj5178&&hdoj5179
- HUST 1606 - Naive
- HUST 1606 - Naive
- 11. Container With Most Water
- 不了解一下人工智能的发展历史,又怎么能看明白 AlphaGo 的对战呢
- 多线程并发的解决方案 volatile synchronized notify notifyAll wait关键字分析
- AIR程序生成系统托盘
- Adobe AIR迷你教程 -- 使用自定义窗口以及对窗口的移动,缩放,关闭操作
- AIR2.0特性回顾
- AIR文件操作:使用文件对象操作文件和目录
- AIR数据处理的方法
- [转]AIR中调用exe或者bat可执行文件
- AIR 教程:生成100%透明窗口,以及打包成.air
- canvas,paint的用法
- sleep和wait的区别
- Codeforces 651B Beautiful Paintings(贪心策略—两个优先队列实现)
- Apache启动提示 httpd: apr_sockaddr_info_get() failed for xxx
- Longtail Hedgehog(DP)
- Contains Duplicate II-副本包含
- 集训队专题(8)1007 Remainder