Am 05.05.2010 15:34, schrieb Stroller: > > On 5 May 2010, at 07:54, Iain Buchanan wrote: >> ... >> I'm looking for some kernel-based notification of changes to my file >> system. I've been looking at inotify, but it's not exactly what I want. >> >> Basically I want to know if _any_ write occurs anywhere. I don't want >> to register a whole bunch of files to watch, I just want to watch an >> entire mount. > > man inotify(7): > ... When a directory is monitored, inotify will return events for the > directory itself, and for files inside the directory. > > > Am I missing something? > > > This article was posted to a different froup recently: > http://www.ibm.com/developerworks/linux/library/l-inotify/index.html > It looks interesting. > > > Stroller. > To repeat my comment on Iain's original "backup to a cold-swap drive" thread, Inotify has two drawbacks which make it hard or even impossible to use for Iain's use case: a) It does not work recursively which means that you have to create a new handle for each subdirectory. Of course, this only means more work for the programmer but there is also the problem that b) As far as I know, Inotify does not scale very good, at least not good enough to monitor a whole system. /proc/sys/fs/inotify/max_user_watches is 65535 on my system. On the other hand, I've never tried to increase that limit and just let it run on a deep directory structure. Who knows, maybe it actually works. Hope this helps, Florian Philipp