Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

File Open by Process

by shaikh741 (Novice)
on Nov 22, 2011 at 20:13 UTC ( #939533=perlquestion: print w/ replies, xml ) Need Help??
shaikh741 has asked for the wisdom of the Perl Monks concerning the following question:

I am looking for a way to capture all the file opens that occur from a process (external command, like system call, etc) called by a Perl script. Any help would be appreciated.

Comment on File Open by Process
Replies are listed 'Best First'.
Re: File Open by Process
by Eliya (Vicar) on Nov 22, 2011 at 20:21 UTC

    Which platform are you on?  On Linux/Unix you could use strace/truss/tusc...  On Windows, there's Process Monitor (from Sysinternals).

Re: File Open by Process
by BrowserUk (Pope) on Nov 22, 2011 at 20:49 UTC

    See StraceNT.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      I am on Linux and trying to create a script which calls an external program which in turn calls compilers and linkers to build C/C++ applications. I would like to capture all the file opens from the the external program to find out exactly which files were opened with complete path to them.
Re: File Open by Process
by eyepopslikeamosquito (Chancellor) on Nov 23, 2011 at 06:20 UTC

    Be aware that, in addition to strace/truss, there is another Unix tool might prove useful when tracking open files, namely lsof.

      thank you monks!!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://939533]
Approved by Eliya
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2016-05-03 23:53 GMT
Find Nodes?
    Voting Booth?