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
    --