Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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
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 (Canon) 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2014-07-24 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (159 votes), past polls