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>”.

0 Shares:
Leave a Reply

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

You May Also Like
Read More

Linux Performance analysis tools

Understand how various Linux performance monitoring tools behave when the system is heavily loaded in terms of cpu, memory and swapping to disk (IO).