Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: (OT) Logging open calls from a C program

by archfool (Monk)
on Jul 28, 2007 at 22:00 UTC ( [id://629331]=note: print w/replies, xml ) Need Help??


in reply to Re: (OT) Logging open calls from a C program (system call tracing tools)
in thread (OT) Logging open calls from a C program

lsof would work, too. (LiSt Open Files). Comes default with linux, can be compiled for other unix-es.
  • Comment on Re^2: (OT) Logging open calls from a C program

Replies are listed 'Best First'.
Re^3: (OT) Logging open calls from a C program
by Anno (Deacon) on Jul 29, 2007 at 12:38 UTC
    I don't think lsof can replace a call trace in this case. The requirement is

    I need to see what files a program is opening,...

    which I read as "List all files the program opens during its lifetime". With lsof you get a snapshot of the files that are open at the moment. You'll miss files that were open but have been closed again, as well as those the program hasn't opened yet.

    Anno

Re^3: (OT) Logging open calls from a C program
by skx (Parson) on Jul 29, 2007 at 01:59 UTC

    Very few things come as defaults with Linux - it will depend upon your distribution ..

    Steve
    --

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://629331]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-20 03:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found