[gentoo-user] kernel notification of file system changes

2010-05-04 Thread Iain Buchanan
Hi, 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 moun

Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Bill Kenworthy
Can the older dnotify do what you want? - it monitors files differently to inotify. There is also gammin/fam. BillK On Wed, 2010-05-05 at 16:24 +0930, Iain Buchanan wrote: > Hi, > > I'm looking for some kernel-based notification of changes to my file > system. I've been looking at inotify, bu

Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread 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

Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Helmut Jarausch
On 5 May, Iain Buchanan wrote: > Hi, > > 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

Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Florian Philipp
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 a

Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Stroller
On 5 May 2010, at 18:24, Florian Philipp wrote: ... man inotify(7): ... When a directory is monitored, inotify will return events for the directory itself, and for files inside the directory. ... To repeat my comment on Iain's original "backup to a cold-swap drive" thread ... Sorry, I starte

Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Iain Buchanan
On Wed, 2010-05-05 at 17:02 +0200, Helmut Jarausch wrote: > Might be I've just asked a similar question on the ZSH mailing list. > Please have a look at inotifywatch from the sys-fs/inotify-tools > package. It can watch a directory tree recursively. it does look interesting, thanks. I would stil

Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Iain Buchanan
On Wed, 2010-05-05 at 15:12 +0800, Bill Kenworthy wrote: > Can the older dnotify do what you want? - it monitors files differently > to inotify. There is also gammin/fam. dnotify locks the files or directories you want to watch, so it would prevent external media from being unmounted. dnotify al

Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Volker Armin Hemmann
On Donnerstag 06 Mai 2010, Iain Buchanan wrote: > On Wed, 2010-05-05 at 15:12 +0800, Bill Kenworthy wrote: > > Can the older dnotify do what you want? - it monitors files differently > > to inotify. There is also gammin/fam. > > dnotify locks the files or directories you want to watch, so it woul

Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Iain Buchanan
On Wed, 2010-05-05 at 18:35 +0100, Stroller wrote: > On 5 May 2010, at 18:24, Florian Philipp wrote: > >> ... > >> man inotify(7): > >> ... When a directory is monitored, inotify will return events for the > >> directory itself, and for files inside the directory. > >> ... > > > > To repeat my comm

Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Iain Buchanan
On Thu, 2010-05-06 at 01:33 +0200, Volker Armin Hemmann wrote: > oh god... fam... that crap caused me so much pain over the years. This bug > ridden zombie is still around? thanks for the heads-up - I guess I should leave FAM to plan B? -- Iain Buchanan I am a friend of the working man, and I

Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Volker Armin Hemmann
On Donnerstag 06 Mai 2010, Iain Buchanan wrote: > On Thu, 2010-05-06 at 01:33 +0200, Volker Armin Hemmann wrote: > > oh god... fam... that crap caused me so much pain over the years. This > > bug ridden zombie is still around? > > thanks for the heads-up - I guess I should leave FAM to plan B? Pl

Re: [gentoo-user] kernel notification of file system changes

2010-05-05 Thread Iain Buchanan
On Thu, 2010-05-06 at 08:54 +0930, Iain Buchanan wrote: > but it's an angle to follow. I wonder how max_user_watches would handle > being 100k or more... no doubt you just need some RAM?! > > thanks, To answer my own questions, I'm now trying this: # echo 10 >/proc/sys/fs/inotify/max_user_

Re: [gentoo-user] kernel notification of file system changes

2010-05-06 Thread Stroller
On 6 May 2010, at 00:51, Iain Buchanan wrote: ... ... 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 fo