# Monitoring Changes to File Attributes

WAR STORY: monitoring more inode activity http://sourceware.org/systemtap/wiki/WSFileMonitor2?highlight=((WarStories)) no script in examples

This section describes how to monitor if any processes are changing the attributes of a targeted file, in real time.

inodewatch2.stp

Like from , takes the targeted file's device number (in integer format) and `inode` number as arguments. For more information on how to retrieve this information, refer to .

The output for is similar to that of , except that also contains the attribute changes to the monitored file, as well as the ID of the user responsible (`uid()`). shows the output of while monitoring `/home/joe/bigfile` when user `joe` executes `chmod 777 /home/joe/bigfile` and `chmod 666 /home/joe/bigfile`.

Sample Output

    chmod(17448) inode_setattr 0x800005/6011835 100777 500
    chmod(17449) inode_setattr 0x800005/6011835 100666 500

script examples monitoring changes to file attributes
examples of SystemTap scripts monitoring changes to file attributes
monitoring changes to file attributes examples of SystemTap scripts
changes to file attributes, monitoring examples of SystemTap scripts
file attributes, monitoring changes to examples of SystemTap scripts