Re: [gamin] monitoring a dir + subdirs using python-gamin



On Tue, Apr 11, 2006 at 09:01:25AM +0200, daniele favara wrote:
> hi all,
> 
> one question .. is it possible to monitor subdirs using python-gamin ?
> 
> i see i have to add them using  watch_directory ...
> 
> case:
> 
> i'm monitoring $HOME/foo a directory "bar" with subdirs + files has
> been added .. gamin will notify just "bar".
> 
> what is the best way to monitor everything  in $HOME/foo?

  You really need to recurse and put a watch on every directories. See
the code for monitoring in sabayon, it does that.
  I tend to think watching everything under a user directory can't work
very well with the current kernel interfaces, you have a race between 
the time a directory is created or removed and the time the user space
can put a watch on it, there is a scaling issue too.

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]