tracing of system calls on Linux

Nate Eldredge neldredge at
Tue May 21 20:23:04 UTC 2002

Partha Saha writes:
 > Hi,
 > I assume that strace works on Linux by using the
 > /proc filesystem.  

Not true.  /proc on linux has no such capability.  strace uses the
ptrace(2) system call.

 > If started by a command line argument
 > such as "-e write" where I indicate interest in only
 > the write system calls, I am wondering whether traps
 > are generated from _all_ system calls and then logging
 > done after filtering over whichever system calls I have expressed
 > interest in,

That's correct.

 > or whether traps are generated only from
 > those system calls I have indicated after the "-e" option.

No, ptrace does not provide this facility.

 > The second method will be obviously more efficient but I
 > am not sure whether the /proc filesystem allows it.
 > Thanks,
 > Partha Saha
 > _______________________________________________________________
 > Don't miss the 2002 Sprint PCS Application Developer's Conference
 > August 25-28 in Las Vegas --
 > _______________________________________________
 > Strace-devel mailing list
 > Strace-devel at


Nate Eldredge
neldredge at

More information about the Strace-devel mailing list