Michael Wardle wrote:
Hello Frank
[SNIP]
When using fam, I realized the FamNextEvent routine throwing errors and
crashing when monitoring more than at about 200 directories.
I've heard about such a problem before, but haven't made the time to
investigate why it is occuring. It's definitely a problem I'd like to fix
soon, so any input is most welcome.
It appeared to me, that fam (or fileschanged/dnotify???) was eating up a
lot of fd's.
Yes, unfortunately this is the way that DNotify works, and FAM on most
GNU/Linux distributions uses DNotify.
Which is exactly why Imon should not only continue to be improved, but
promoted as being superior to the crap which passes as Dnotify.
So finally I decided to write my own kernel notifier, and patch it into
fam. I built it as a kernel module (linux;-), that hooks into the
sys_calls, and writes events to /dev/fwatch. The required select routine to
read the events seemed to be quite close to the one imon uses, so I just
hacked the code into IMonNone.c++ and IMon.c++.
When FAM was first open sourced, SGI made available a version of IMon for
Linux (as you will see). After I became aware of the Linux DNotify API in
Linux 2.4, I started recommending that people use Alex Larsson's DNotify
patch on Linux so I wouldn't have to maintain an IMon kernel patch for each
Linux kernel release and so users could get acceptable performance from FAM
without patching their kernel. Since suggesting people use DNotify, it has
become apparent that it has some limitations. :-(
It's intriguing that you've provided another monitor. I'll have a look at it,
and place it the contrib directory of our FTP site if it seems usable.
Thanks for sending it.
With all the negative feedback surrounding DNotify, perhaps it is time
for the kernel people to face the reality that it is an inferior
interface and an alternative choice should be made available to the
Linux community.
Cheers,
Nicholas
|