[Wolves] Monitoring everything

Aquarius aquarius-lists at kryogenix.org
Fri Apr 9 22:17:29 BST 2004


Peter Oliver spoo'd forth:
> Aq wanted to know how he could get notified of every filesystem 
> notification on a system, and I suggested FAM.  However, from the fam(3X) 
> manual:
> 
> BUGS
>       Each process is limited to 1000 active requests at a time.
> 
> That's not even enough to monitor a single user's home directory.  That
> leaves you using the kernel hooks directly, and you can't do NFS
> filesystems.

First off, NFS can sod off. :)

I think it is enough, because FAM can monitor directories, and if you
monitor a directory you get notifications of changes, additions, and
deletions on files within it for free. A thousand directories in your
home isn't beyond the realms of possibility (mine contains 9106, 
according to 'ls -R $HOME | grep -c "^$HOME.*:$"' -- you may have 
a better way of working this out! -- but I am atypical, and I've
got a whole different root filesystem mounted in a directory in
my $HOME) but it's fairly high.

Aq.

-- 
from string import *;import re,base64;w=base64.decodestring('YXF1YXJp'+
'dXNAa3J5b2dlbml4Lm9yZw==');u='['+lowercase+']';print re.sub(u,'-',w)
while filter(lambda x: x in u,w): s=raw_input('Letter:');u=filter\
(lambda x: x != s,u);print re.sub(u,'-',w)



More information about the Wolves mailing list