real-time filesystem monitoring
Hi,
I am working on a GPL-ed tool to monitor a filesystem in real time and then perform a backup as soon as something has changed. In that direction I tried FAM/libfam and dnotify and both choked on large directory hierarchies. dnotify seems to require open file descriptors so it is not a good solution unless one is to carefully control the number of the file descriptors open and perform (sometimes large and slow) directory re-reads every time there is some change (whose nature dnotify will not report). I wanted to also port the code to Windows and provide a free solution for its users and it turns out implementing such a solution on Windows is much easier - there is a function called ReadDirectoryChangesW which will notify an application every time there is a filesystem-wide change and provide all information about this change. Anything similar on Linux?
Thank you,
Ognen
Quoted 4 lines · Ognen Duzlevski
Hi,
I am working on a GPL-ed tool to monitor a filesystem in real time and -
Hello,
You can have a look how this has been done elsewhere:
http://www.bangstate.com/changedfiles/
I have tested this here and it works nicely, but you should expect a higher system load using the userspace daemon for handling file-access notification actions.
--
Jan Kokoska
Quoted 2 lines · Ognen Duzlevski
I am working on a GPL-ed tool to monitor a filesystem in real time and then perform a backup as soon as something has changed.
Yeah, been waiting a long time for this
Quoted 2 lines
I tried FAM/libfam and dnotify and both choked on large directory hierarchies.
Yeah, I first checked this out too.
Quoted 2 lines
Anything similar on
Linux?
Filemon, http://www.sysinternals.com, runs on both gnu and windows but is not free software.
Signature · 1 line
b0ef