LSOF如何将端口映射到Solaris上的进程? [英] How does LSOF map port to process on Solaris?
问题描述
我对Linux上的工作方式有所了解,他们可能会通过/proc//fd并显示每个进程使用的套接字.
I have an idea of how it's done on Linux, they probably go through /proc//fd and to display the sockets used by each process.
不幸的是,它看起来不像Solaris上的/proc//fd条目列表套接字.有谁知道lsof将如何在此系统上执行此操作?还是一般来说,怎么办?
Unfortunately, it doesn't look like the /proc//fd entries list sockets on Solaris. Does anyone know how lsof would do it on this system? Or how one would even go about this in general?
只是重新陈述一下我真正需要的是什么:我需要某种方式来查找Solaris上哪些进程正在监听哪些端口(当然不使用lsof).
Just to restate what exactly it is I need: I need some way to find which processes are listening to which ports (without using lsof of course) on Solaris.
推荐答案
如果运行的是Solaris 11.2,则可以使用netstat -u
.根据手册页:>
If you're running Solaris 11.2, you can use netstat -u
. Per the man page:
-u
列出用户,进程ID和最初创建网络端点或现在对其进行控制的程序.
Lists the user, process id, and the program which originally created the network endpoint or controls it now.
这篇关于LSOF如何将端口映射到Solaris上的进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!