Hi,
Thanks for your reply.
To clarify things: what I meant was not neccessarily recursively going
through directory-trees, but more like this:
imagine a directory tree like this:
/var/log/apache1.3/site1/
site2/
apache2.x/site3/
site4/
In my example, I wanted to monitor all files in the directories of site1,
site2, site3 and site4: NOT the subdirectories of site1-4(!). So in my
current implementation I would call glob("/var/log/apache*/site*/*", ...);.
I went through the FAM documentation and it looks as this is not possible
with FAM, am I right?
On Thu, 5 Aug 2004, Viner, David wrote:
> Date: Thu, 5 Aug 2004 08:25:25 -0700
> From: "Viner, David" <dviner@xxxxxxxxxxxxx>
> To: 'Folkert van Heusden' <folkert@xxxxxxxxxxxxxx>, fam@xxxxxxxxxxx
> Subject: RE: monitoring a complete path in one go
>
> my understanding of fam's current implementation is that you need to tell
> fam each directory that you want it to monitor. there's no option that I'm
> aware of which allows you to recursively watch directories... altho that
> seems like an interesting (tho potentially resource consumptive) option that
> we might add.
>
> dave
>
> -----Original Message-----
> From: Folkert van Heusden [mailto:folkert@xxxxxxxxxxxxxx]
> Sent: Thursday, August 05, 2004 5:41 AM
> To: fam@xxxxxxxxxxx
> Subject: monitoring a complete path in one go
>
>
> Hi,
>
> My program multitail enables users to monitor not only a file, but also a
> directory of files. One can then set to monitor for example:
> /var/log/apache*/*/*
> As you can see it supports multiple levels of directories.
> Currently I'm using glob() to get a list of files matching the given pattern
> and then calculate the difference with the previous run, every 5 seconds.
>
> My question now is: will I also be able to do this with FAM? Or will I need
> to retrieve complete directory-listings for each level (/var/log/apache1,
> /var/log/apache2, /var/log/apache1/site1, /var/log/apache1/site2, etc.) and
> start monitoring each of them? Or can I just pass "/var/log/apache*/*/*" to
> fam?
>
>
> Folkert van Heusden
>
> +------------------------------------------------------------------+
> |UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)|
> |a try, it brings monitoring logfiles to a different level! See |
> |http://vanheusden.com/multitail/features.html for a feature list. |
> +------------------------------------------= www.unixsoftware.nl =-+
>
>
Folkert van Heusden
+------------------------------------------------------------------+
|UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)|
|a try, it brings monitoring logfiles to a different level! See |
|http://vanheusden.com/multitail/features.html for a feature list. |
+------------------------------------------= www.unixsoftware.nl =-+
|