Hi, I have a fileserver at home, where my household stores common data, like downloaded content, pictures etc.. And once an hour I run a script that checks for new dirs last 60 minutes matching some criteria, and outputs the path to an IRC-channel. Where we can see if someone else has added new stuff. Method used is "find -mmin -60", which gets horrible slow when more data is added. My question is if there exists some method I can get the same results but based on events rather than seeking through everything once an hour. Some kind of filesystem eventlog, or similar. I rather new to solaris/zfs, so maybe there is an obvious answer to this (I have tried google J) -- Vidar -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100206/61d4823e/attachment.html>
"Nilsen, Vidar" <Vidar.Nilsen at palantir.no> wrote:> Method used is "find -mmin -60", which gets horrible slow when more data > is added.This is a questionable "feature" from GNU find. A standard compliant extension with this ad more features is: find -mtime -1h See also sfind which is in: ftp://ftp.berlios.de/pub/schily/ J?rg -- EMail:joerg at schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 Berlin js at cs.tu-berlin.de (uni) joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
"Nilsen, Vidar" <Vidar.Nilsen at palantir.no> writes:> And once an hour I run a script that checks for new dirs last 60 > minutes matching some criteria, and outputs the path to an > IRC-channel. Where we can see if someone else has added new stuff. > > Method used is ?find ?mmin -60?, which gets horrible slow when more > data is added. > > My question is if there exists some method I can get the same results > but based on events rather than seeking through everything once an > hour.yes, File Events Notification (FEN) http://blogs.sun.com/praks/entry/file_events_notification you access this through the event port API. http://developers.sun.com/solaris/articles/event_completion.html gnome-vfs uses FEN, but unfortunately gnomevfs-monitor will only watch a specific directory. I think you''ll need to write your own code to watch all directories in a tree. -- Kjetil T. Homme Redpill Linpro AS - Changing the game
"Kjetil Torgrim Homme" writes:>yes, File Events Notification (FEN) > > http://blogs.sun.com/praks/entry/file_events_notification > >you access this through the event port API. > > http://developers.sun.com/solaris/articles/event_completion.html > >gnome-vfs uses FEN, but unfortunately gnomevfs-monitor will only watch a >specific directory. I think you''ll need to write your own code to watch >all directories in a tree.Thanks. I''ll check out FEN. I was hoping to avoid writing some homebrew-program for this :-) But it seems like it?s the only option. -- Vidar