A System Call Trace Facility
Joseph Simonetti
joes at sbcs.UUCP
Sat Jun 1 02:17:59 AEST 1985
I have implemented an enhancement to the Berkeley 4.2 kernel
which allows one to log the system calls made by any process
or processes. For each system call made by a traced process,
the name of the system call, its arguments and the result
returned by the kernel to the user are recorded.
Arguments are formated in a manner consistent with the particular
system call. For instance, the pathname passed to the open system
call is retrieved from user memory and recorded in the log as a
character string. The log file is written as a plain text file
which is human-readable.
I have found this tool to be very useful since it allows one
to figure out why some piece of system software does not function
without the need to dig through the source code, insert debugging
statements, recompile and re-install. The trace is also valuable
when you want to explore the functioning of system software in
general since you can monitor such things as daemons without
interfering with their operation.
Since it would not be reasonable to present a lengthy
discussion of the design issues and uses of the trace facility here,
interested persons may obtain the Technical Report by sending
mail to ...sbcs!kathy. Ask for TR # 85/13 which is
entitled "A System Call Trace Facility". Please include your
U. S. mail address.
Anyone interested in obtaining source code for my
routines and the context diffs needed to modify the Berkeley
Kernel routines can send mail directly to me (...sbcs!joes).
The trace utility was implemented in March and has been running
without incident on one of our VAX 750's, so I have a
reasonable degree of confidence in the code.
I would also be happy to entertain any comments
or suggestions you may have regarding this utility.
Sincerely,
Joseph D. Simonetti
More information about the Comp.unix.wizards
mailing list