# Monitoring Changes to File Attributes

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

## inodewatch2.stp

Like inodewatch from inodewatchsect, inodewatch2 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 inodewatchsect.

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

## inodewatch2 Sample Output

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