SLUG Mailing List Archives
[SLUG] Finding open files on the system
- To: slug@xxxxxxxxxxx
- Subject: [SLUG] Finding open files on the system
- From: Andrew Eager <andrew.eager@xxxxxxxxxxxxx>
- Date: Wed May 9 18:23:01 2001
- Organization: All Electronic Services
- User-agent: Mozilla/5.0 (X11; U; Linux 2.2.19-6.2.1 i686; en-US; 0.8.1) Gecko/20010421
At the last meeting, it was asked:
" If the disk is spinning madly is there any way to determine which
process is causing the activity ?"
A bloody good question that I have asked myself many times. I used to
have a utility called 'fopen' under QNX but not under linux.
If anyone is interested, I have written a utility called 'fopen' which
does the following
a) Prints the PID, Process name & Currently open files for that PID
b) as above but for sockets
c) as above but for pipes.
It also prints either the size of the file (so you can see it growing)
or optionally, the time since last access/change/modification.
PID PROCESS TIME FILE/RESOURCE
1161 crond 00:05:18 /var/log/cron
If anyone interested, let me know.