0
点赞
收藏
分享

微信扫一扫

Cenotos Linux 查看一个进程的使用的二进制文件打开的文件和线程数量

乌龙茶3297 2024-10-04 阅读 14
Linux运维

进程调用的二进制文件
[root@sre01 ~]# ls -l  /proc/715/exe 
lrwxrwxrwx. 1 root root 0 Oct  3 20:08 /proc/715/exe -> /usr/sbin/crond

进程打开的文件
[root@sre01 ~]# ls -l  /proc/715/fd
total 0
lr-x------. 1 root root 64 Oct  3 20:08 0 -> /dev/null
lrwx------. 1 root root 64 Oct  3 20:08 1 -> socket:[17636]
lrwx------. 1 root root 64 Oct  3 20:08 2 -> socket:[17636]
lrwx------. 1 root root 64 Oct  3 20:08 3 -> /run/crond.pid
lrwx------. 1 root root 64 Oct  3 20:08 4 -> socket:[17746]
lr-x------. 1 root root 64 Oct  3 20:08 5 -> anon_inode:inotify

进程的线程数量
[root@sre01 ~]# grep -i threads  /proc/715/status
Threads:        1
[root@sre01 ~]#

715是PID,查那个进程填哪个

举报

相关推荐

0 条评论