Files used by process

To check what files are being used by a process, you can use lsof with option -p.

Example:

# lsof -p 2791
COMMAND  PID USER   FD   TYPE     DEVICE      SIZE    NODE NAME
syslogd 2791 root  cwd    DIR        8,2      8192       2 /
syslogd 2791 root  rtd    DIR        8,2      8192       2 /
syslogd 2791 root  txt    REG        8,2     35712 1046656 /sbin/syslogd
syslogd 2791 root  mem    REG        8,2     52152  523300 /lib/libnss_files-2.3.2.so
syslogd 2791 root  mem    REG        8,2   1572440 1291815 /lib/tls/libc-2.3.2.so
syslogd 2791 root  mem    REG        8,2    106912  523267 /lib/ld-2.3.2.so
syslogd 2791 root    0u  unix 0xf6439880              2746 /dev/log
<snip>

In Solaris, you can also use “pfiles <pid>”.

Total
0
Shares
Leave a Reply

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

Previous Post

Xen : Administration commands

Next Post

Xen tutorial

Related Posts