> Here are a some of the file event types considered. > > FILE_OPEN File opened. > FILE_CLOSE File closed. > FILE_WRITE File was written to. > FILE_READ File was read. > FILE_ATTRIB_CHANGE File attributes changed > FILE_CREATE File/Directory was created. > FILE_REMOVE/UNLINK File/Directory was removed/deleted. > FILE_RENAME_TO/FROM File was renamed to/from.
How about file locking/unlocking? If a file was resized (truncated), how would that be represented? It might also be an idea to be able to differentiate between file-writing and file-appending. What would happen if one file was renamed over another - would you get one event or two (one for rename, one for old file effectively being deleted)? As a related concept, does anyone know how easy or practical it would be to use ZFS's copy-on-write update mecanism to be able to read a "log" (effectively) of recent changes to a file-system? I'm thinking of an API where you start by passing a start date/time, and then can iterate through each change in sequence. Obviously, there would be no gurantees on the scope (in terms of date range) of such data. It's hard to think of good usage cases right away though, and the type of applications/situation that could make use of such a thing would probably be rather different to event-notification applications. But, say your system just rebooted and you wanted to get an idea of what files were changed (and how) just prior to the reboot. Or you want to get an idea of recent (but not current) activity by a particular user, or to a particular directory tree. This message posted from opensolaris.org _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org