I'd like to better understand which programs are modifying a specific file1 during a reboot. Can I set something up to log this kind of information?
Polling for which processes currently have the file open won't work, as the file may only be open for a few milliseconds.
Can kernel tracing be used to collect this information?
1 /var/lib/alsa/asound.state
if you're curious, but I'm interested in a general solution.
lsof
is another tool that might be useful, if it is wrapped in something. – belacqua Feb 02 '11 at 21:01-f
does anything. (Source) – ændrük Feb 02 '11 at 23:28fuser
andlsof
can only report what is occurring at a given instant. For all I know, however, the file may only remain open for a fraction of a second. How frequently would I need to poll with these tools to be sure not to miss the file being opened? – ændrük Feb 03 '11 at 03:55watch
command pretty difficult to read anyway, so running it with say-n .1
will be even uglier. I think another solution may be required. Sorry. – Scaine Feb 03 '11 at 16:43