fam
[Top] [All Lists]

Re: [fam] Directory Notification

To: fam@xxxxxxxxxxx
Subject: Re: [fam] Directory Notification
From: "Rusty Ballinger" <rusty@xxxxxxxxxxxxxxxxxx>
Date: Mon, 16 Oct 2000 02:48:33 -0700
In-reply-to: "E. Brian Gast" <gasteb@xxxxxxxxxxxx> "[fam] Directory Notification" (Oct 13, 6:37pm)
References: <20001013183742.A5802@xxxxxxxxxxxxxxxx>
Reply-to: rusty@xxxxxxx
Sender: owner-fam@xxxxxxxxxxx
> The questions are:
>
> Are there any plans to increase the amount of data sent to the application,
> either before or after 2.4.0?  Imon currently provides the device and inode
> of the file that changed.  Without this, it looks like Fam will have to store
> the state of the directories it is monitoring so it find out which file
> actually changed.

Actually, it already has to store the state of all the things its monitoring;
I think the problem here is that it will have to poll everything it's
monitoring every time anything changes, which sucks.  (So if you're monitoring
a directory with a thousand files, every time one of them changes, you'll have
to stat all of them.)  If there's a way we can get the device & inode in the
signal handler, that would be great.

(Seems like there must be a way to get more information--otherwise, what is
the point of the DN_ACCESS fcntl flag?)

> Are there any plans to implement file notification?  Fam currently supports
> the ability to monitor a single file.  Having this support in the kernel
> isn't that big a deal, Fam can easily monitor the directory and ignore
> changes to the other files.

(especially if we can get the device & inode!)

> There is also some concern about Fam running out of file descriptors with
> applications which monitor lots of files

This seems like a serious problem to me, but maybe it's not that big of a
deal--if you're running out of fd's, fork and have the child handle the
additional requests?  (Seems like there's the potential for a lot of ugliness
here.)

--Rusty

P.S.  This is only related because it's something imon does: if someone is
adding a way to get the device & inode in the signal handler, they should
take the code from imon which keeps track of executing files (I think
imon.txt describes it) and make it send notification whenever a file starts
& stops executing (imon currently only sends notification when the first
instance of a file starts executing, and when the last instance terminates).
If you had that, and it also gave you the PID, you could write some really
interesting tools.

--
Source code, list archive, and docs: http://oss.sgi.com/projects/fam/
To unsubscribe: echo unsubscribe fam | mail majordomo@xxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>