• 查看一个进程打开了哪些文件的命令


    查看进程14755(httpd)打开了哪些文件:
    localhost:~# lsof -p 14755
    COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
    httpd 14755 apache cwd DIR 8,1 4096 2 /
    httpd 14755 apache rtd DIR 8,1 4096 2 /
    httpd 14755 apache txt REG 8,1 332264 9241061 /usr/sbin/httpd
    httpd 14755 apache DEL REG 0,9 34211 /dev/zero
    httpd 14755 apache DEL REG 0,9 34213 /dev/zero
    httpd 14755 apache mem REG 8,1 143600 5636098 /lib64/ld-2.5.so
    httpd 14755 apache mem REG 8,1 615136 5636111 /lib64/libm-2.5.so
    httpd 14755 apache mem REG 8,1 129984 5636110 /lib64/libpcre.so.0.0.1
    httpd 14755 apache mem REG 8,1 95464 5636153 /lib64/libselinux.so.1
    httpd 14755 apache mem REG 8,1 108136 24491378 /usr/lib64/libaprutil-1.so.0.2.7
    httpd 14755 apache mem REG 8,1 48600 5636156 /lib64/libcrypt-2.5.so
    httpd 14755 apache mem REG 8,1 245488 24496044 /usr/lib64/libldap-2.3.so.0.2.31
    httpd 14755 apache mem REG 8,1 59040 24493410 /usr/lib64/liblber-2.3.so.0.2.31
    httpd 14755 apache mem REG 8,1 1008656 5636170 /lib64/libdb-4.3.so
    httpd 14755 apache mem REG 8,1 143144 5636289 /lib64/libexpat.so.0.5.0
    httpd 14755 apache mem REG 8,1 160944 24490671 /usr/lib64/libapr-1.so.0.2.7
    httpd 14755 apache mem REG 8,1 145824 5636131 /lib64/libpthread-2.5.so
    httpd 14755 apache mem REG 8,1 23360 5636107 /lib64/libdl-2.5.so


    找到哪些进程打开了/usr/sbin/httpd文件:

    localhost:~# lsof  /usr/sbin/httpd
    COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
    httpd 14746 root txt REG 8,1 332264 9241061 /usr/sbin/httpd
    httpd 14747 apache txt REG 8,1 332264 9241061 /usr/sbin/httpd
    httpd 14748 apache txt REG 8,1 332264 9241061 /usr/sbin/httpd
    httpd 14750 apache txt REG 8,1 332264 9241061 /usr/sbin/httpd
    httpd 14751 apache txt REG 8,1 332264 9241061 /usr/sbin/httpd
    httpd 14752 apache txt REG 8,1 332264 9241061 /usr/sbin/httpd
    httpd 14753 apache txt REG 8,1 332264 9241061 /usr/sbin/httpd
    httpd 14754 apache txt REG 8,1 332264 9241061 /usr/sbin/httpd
    httpd 14755 apache txt REG 8,1 332264 9241061 /usr/sbin/httpd


    localhost:~# pidof /usr/sbin/httpd
    14755 14754 14753 14752 14751 14750 14748 14747 14746



  • 相关阅读:
    java中继承和多态的理解
    汽车租赁系统
    s2第六章继承和多态
    第三章泛型集合ArrayList 和Hashtable
    第二章项目总结
    s2第二章深入c#类型
    .NET平台
    航班查询系统
    java初始重点语法
    JDBC
  • 原文地址:https://www.cnblogs.com/feisky/p/2434552.html
Copyright © 2020-2023  润新知