Trace operations on a particular file/device?

Grant Edwards grant.b.edwards at gmail.com
Wed Feb 9 16:13:19 UTC 2011


On 2011-02-02, Grant Edwards <grant.b.edwards at gmail.com> wrote:

> I may try out a few different options on the Python version of
> strace.

FYI,

I've been testing new features I've added to the Python
implementation of strace, and I'm pretty happy with them:

 1) I've added code to keep track of the paths associated with file
    descriptors by watching for open/close/dup/dup2/clone calls.

 2) I've added a command-line option to display the associated path[s]
    for all syscalls that have file descriptors as parameters.

 3) I've added a command-line option to filter the display of syscalls
    based on a list of paths.  It will output only syscalls who's
    parameters include either a one of the specified paths or a file
    descriptor associated with one of the specified paths.

That required a total of 90 lines of code.

I'm going to start working on re-implementing the above in C...
    
-- 
Grant Edwards               grant.b.edwards        Yow! WHO sees a BEACH BUNNY
                                  at               sobbing on a SHAG RUG?!
                              gmail.com            





More information about the Strace-devel mailing list