Lin Ma wrote: > > > Glynn Foster wrote: >> Hey, >> >> James Litchfield wrote: >> >>> Fired up prstat the other day and noticed something new: gam_server was >>> running around madly stating files. This seems to be >>> >>> http://www.gnome.org/~veillard/gamin/ >>> >>> The obvious question is why not use the Solaris file monitoring >>> capabilities instead of stating the world away.... >>> >> >> Gamin is currently built with a patch that should enable Solaris' FEM - >> >> http://src.opensolaris.org/source/xref/jds/spec-files/trunk/patches/gamin-01-all.diff >> >> >> >> hopefully others on the list will be able to say why it's behaving >> this way. >> > It behaves as it expected. Solaris FEN need stat things to get the > precise file time stamps before fetch the correct events. We also need > stat the missing files to know when they are available. If the system > is overload due to stat, the only thing we can do is reduce the > frequency of the sys-call stat. > Parkash is the expert of Solaris FEN, he may correct the mistakes if > there have. >
The application/Gamin does not have to keep stat'ing missing files until they are created. When a file gets created, the directory it got created under, is marked modified. Therefore, the application should monitor the directory for modification. Once it receives a directory modification event it can stat to check if the desired file has been created. Ex. If the application needs to know when the following file gets created. /home/foo/file Monitor the directory '/home/foo' for modification, and check if the file got created when the directory modification event is received. -Prakash. > Thanks, > lin > >> >> Glynn >> _______________________________________________ >> desktop-discuss mailing list >> desktop-discuss at opensolaris.org >> >
