fam
[Top] [All Lists]

Re: [fam] Some questions

To: Andy MacNamara <am1129@xxxxxxxxxx>
Subject: Re: [fam] Some questions
From: Michael Wardle <michael.wardle@xxxxxxxxxx>
Date: Mon, 25 Feb 2002 11:50:16 +1100
Cc: fam@xxxxxxxxxxx
Organization: Adacel Technologies
References: <Pine.GSO.4.44.0202232045530.22127-100000@xxxxxxxxxxxxxxxxxx>
Sender: owner-fam@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.8) Gecko/20020204
Andy MacNamara wrote:
Actually, one more question...


An alternative to IMon on Linux is DNotify.  This seems to be the best
option for the future, rather than having us maintain Linux IMon
patches.  You can find a patch adding DNotify support to FAM in our
downloads area.


How featureful is DNotify? How does it compare to IMon? Can you do the
same things with the two?

They both provide the same basic functionality. Red Hat Linux is using FAM/DNotify, and it seems to be doing everything it needs to.

There is some documentation on DNotify in the Linux kernel sources, or you can get it online here:
<URL:http://www.linuxhq.com/kernel/v2.4/doc/dnotify.txt.html>

I think the best documentation of IMon is probably the source, but there's some documentation here:
<URL:http://oss.sgi.com/projects/fam/imon.txt>

(If that's the best documentation there is, then it's time to make a new one.)

The first difference I notice is in the events each will report:

EVENT      |    IMon    |  DNotify    |
-----------|------------|-------------|
accessed   |      -     |  DN_ACCESS  |
modified   | Changed?   |  DN_MODIFY  |
created    | Created    |  DN_CREATE  |
deleted    | Deleted    |  DN_DELETE  |
renamed    | Moved*     |  DN_RENAME  |
changed    | Changed?   |  DN_ATTRIB  |
begin run  | Executing  |      -      |
end run    | Exited     |      -      |
other      | Exists     |      -      |
other      | EndExist   |      -      |

* moved is currently unsupported

This table is a quick comparison, and is not authoritative. Please don't rely on this information.

If anybody has additions or corrections, let me know, and I'll put a table like this on the FAM project pages someday.

In essence, it seems that IMon can report if a file has been executed, and DNotify can report if a file has been accessed. Otherwise, they both handle the same basic functions.

There was also discussion about what happens if a large number of files
are monitored simultaneously.  It is my understanding that DNotify uses
a separate file descriptor for every file it watches, but IMon only uses
one per drectory.  There was some discussion about this between the
previous maintainer and the list. I have not looked into this, so do not know what exactly happens. Please see the archives for more details.

On the other hand, I believe IMon uses a hash of fixed size to keep all
the interests, so it is possible that monitoring a really large number
of files (larger than the hash can handle) could cause problems.

Further to your original question, I am not sure whether either can handle pseudo-filesystems such as /proc and /dev. Give it a try and let me know what you find out (please!).

Regards

--
MICHAEL WARDLE                |  WORK   +61-2-6024-2699
SGI Desktop & Admin Software  |  MOBILE +61-415-439-838
Adacel Technologies Limited   |  WEB    http://www.adacel.com/



--
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>