Show open files of a process
which files does this process have open | what is this process doing right now | open files of a pid | lsof for a process | lsof | files | troubleshootinglsof -p 1234Shows every file, library, socket and network connection the process holds open. For a hanging PHP process, this reveals which file or connection it is waiting on. lsof /path/to/file works the other way around: which process holds a file open.
Note: lsof is not always preinstalled on Debian (apt install lsof). Alternatively, ls -l /proc/<PID>/fd shows the open file descriptors.
Also searched as
- which files does this process have open
- what is this process doing right now
- open files of a pid
- lsof for a process