http://h34nug3iwqjf2376fmmzdhgqivckzemcujmarlptfqeqtq7vya47yyad.onion/2008/01/13/psmisc-a-closer-look-to-a-standard-package/index.html
While fuser is a regular system administrator’s tool, peekfd is a real deep-diver: it lets you watch what goes on on a filedescriptor of a process. (Please note that peekfd is not available in etch, you need psmisc from Lenny or newer.) If you type peekfd <pid> at a terminal, it will follow all file descriptors of the process, to get an output like this: $ peekfd 7808
writing fd 1:
foo bar Where 7808 is just cat >/dev/null in another terminal window, with me typing “foo...