View previous topic :: View next topic |
Author |
Message |
loony Apprentice
Joined: 25 Feb 2004 Posts: 199
|
Posted: Sat Feb 16, 2008 1:34 pm Post subject: [SOLVED] List of files opened by a program (continuously) |
|
|
Hello,
I would like to find out which files a program accesses from the beginning of its execution to the end. I only know lsof, but it doesn't collect data continuously like top or so...
Has anybody an idea? Thanks!
loony _________________ Please vote for this issue of OpenOffice.org (18004): http://qa.openoffice.org/issues/show_bug.cgi?id=18004
Last edited by loony on Sat Feb 16, 2008 1:49 pm; edited 1 time in total |
|
Back to top |
|
|
loony Apprentice
Joined: 25 Feb 2004 Posts: 199
|
Posted: Sat Feb 16, 2008 1:49 pm Post subject: |
|
|
Ups, I should have read the f** manual lsof allows a continuous monitoring of a process with the -r switch
_________________ Please vote for this issue of OpenOffice.org (18004): http://qa.openoffice.org/issues/show_bug.cgi?id=18004 |
|
Back to top |
|
|
loony Apprentice
Joined: 25 Feb 2004 Posts: 199
|
Posted: Sat Feb 16, 2008 2:50 pm Post subject: |
|
|
loony wrote: | Ups, I should have read the f** manual lsof allows a continuous monitoring of a process with the -r switch
|
Monitoring with inotify (and e.g. pyinotify) would also be possible and it would not be limited to a 1 second delay monitoring like lsof. _________________ Please vote for this issue of OpenOffice.org (18004): http://qa.openoffice.org/issues/show_bug.cgi?id=18004 |
|
Back to top |
|
|
mar_rud n00b
Joined: 27 Jul 2006 Posts: 72 Location: Poland
|
Posted: Sat Feb 16, 2008 3:18 pm Post subject: |
|
|
I looked at this thread just by curiosity and after "man strace" found another solution: Code: | strace -e trace=open,close program_cmd | Probably it should be easy to write some script/program parsing open/close lines to list only opened files in realtime. |
|
Back to top |
|
|
loony Apprentice
Joined: 25 Feb 2004 Posts: 199
|
Posted: Sat Feb 16, 2008 3:24 pm Post subject: |
|
|
mar_rud wrote: | I looked at this thread just by curiosity and after "man strace" found another solution: Code: | strace -e trace=open,close program_cmd |
|
Cool, maybe better for people without inotify support in kernel. Thanks! _________________ Please vote for this issue of OpenOffice.org (18004): http://qa.openoffice.org/issues/show_bug.cgi?id=18004 |
|
Back to top |
|
|
|