TrackFS 0.0.7 review
DownloadTrackfs is a small program that tracks file system changes -- creation, update and removal of fs objects -- of another program (or gr
|
|
Trackfs is a small program that tracks file system changes -- creation, update and removal of fs objects -- of another program (or group of programs). TrackFS is similar to `installwatch', but works quite differently: While installwatch uses LD_PRELOAD to intercept library functions like open() and unlink(), trackfs runs the child program(s) with tracing enabled and tracks the system calls they make.
If course this has an impact on performance: with trackfs, programs run several times slower. But since trackfs is not intended for general use but rather for installation tasks, speed probably doesn't matter as much as one might think.
On the other hand, there's a significant advantage: trackfs also works with statically linked binaries. The LD_PRELOAD approach may miss transactions, but with ptrace() you'll get all of them.
There are two operating modes: With the `-l < logfile >' option, trackfs will log fs changes to the specified file. All entries have the (printf-style) format "%c %sn", with the single character indicating the kind of change -- c(reate), d(elete), u(pdate) or t(emporary) -- and the string reporting the full path of the corresponding object. Note that the logfile is "compressed", that is, multiple transactions dealing with the same object will be grouped together and reported as one "resulting" transaction. E.g. if you first delete a file and then re-create it, an update will be reported. If a file is first created and then deleted, the path is reported as temporary instead.
The option `-b < backup-file >' instructs trackfs to backup every file that is probably going to be modified. In some cases, the backup may not be necessary -- better safe than sorry -- because the modification fails, e.g. due to insufficient permissions. You'll have to consult
the log file in order to find out which files were actually modified and will have to be restored if something failed.
If the command you intend to run under trackfs' control includes options, you probably have to put the `--' pseudo-option in front of it:
trackfs $trackfs_options -- command $command_options $args
This is because getopt() may re-order arguments and options on some systems (the GNU version does so by default).
What's New in This Release:
This release should work on i386 systems again (was broken in 0.0.5).
TrackFS 0.0.7 search tags