Jun 02 2008

Linux和solaris下面检测程序打开文件和socket

Category: 技术ssmax @ 14:53:13

solaris下面就有个很简单的命令

pfiles -p pid

linux下面也有,rhel里面集成了lsof

lsof -p pid

或者去 ls -alh /proc/pid/fd/

socket[inode_num],方括号里面就是inode数字,再怎么看详情没有研究出来方便的方法,还是到

/proc/net/tcp 里面找找,ip是用8位16进制字符表示的。。。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.