On 2008-02-05, Mark W. de Raad <[EMAIL PROTECTED]> wrote: > If you (or another reader) have time for a question, our purpose is: > > Monitor a directory of files > Notice any file changes within that directory > Initialise a replication process (separate program) > > We were hoping to use CLOSE_MODIFIED to only trap the files that > have changed (apart from simply being accessed). > > Regarding the move of CLOSE_MODIFIED to the userland, would you > recommend storing the file information in a database? DB2? Mysql?
I do not have any _real_ database experience so I can't offer any suggestion here. > I presume trigger a process whenever a CLOSE event is trapped (we do > not always seem to get OPEN events for some reason, particularly > when data is appended to a file) It would be helpful if you could provide a reproducable example of a situation where OPEN is not generated. Also be aware that symbolic links may play a role. For example, on FreeBSD it is typical that /home is a symbolic link to /usr/home. If Dazuko is monitoring /home and another application access a file with the path /usr/home/... then Dazuko will not see it. The same is for the reversed situation. > We would also need to generate a checksum I presume - would you > recommend CRC or MD5? (speed is a factor of course). A very quick test is to look at the information returned by the stat(2) function. If everything is the same (except probably the atime) then it is probably safe to assume the file has not changed. This depends on the filesystem being used, but may serve as an excellent optimization. John Ogness -- Dazuko Maintainer _______________________________________________ Dazuko-help mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/dazuko-help
