hp-ux – 什么进程在UNIX上使用哪些端口?

我需要找出哪些端口连接到Unix机器(HP Itanium)上的哪些进程。不幸的是,lsof没有安装,我没有办法安装它。

有没有人知道一种替代方法?相当漫长的Google搜索会话没有打开任何东西。

假设这是HP-UX? Ptools – 你有那些安装?如果是这样,可以使用“pfiles”来查找应用程序正在使用的端口:

pfiles prints information about all open file descriptors of a process.
If file descriptor corresponds to a file,then pfiles prints the fstat(2)
and fcntl(2) information.

If the file descriptor corresponds to a socket,then pfiles prints socket
related info,such as the socket type,socket family,and protocol family.

In the case of AF_INET and AF_INET6 family of sockets,information about
the peer host is also printed.

for f in $(ps -ex | awk'{print $ 1}’); do echo $ f; pfiles $ f | grep PORTNUM;完成

请切换端口号的PORTNUM。 :)可能是孩子pid,但让你足够接近以识别问题的应用程序。

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...