Subject: strace 3.0: system call tracer for sunos, linux, svr4, solaris2
From: [email-masked] (Rick Sladkey)
Date: 2 Jul 1994 22:47:20 GMT
Newsgroups: comp.os.linux.announce

This is strace 3.0, a system call tracer for SunOS 4.x, Linux, System
V release 4 and Solaris 2.x.  strace can be obtained from:

	sunsite.unc.edu:/pub/Linux/devel/strace/strace-3.0.tar.gz

This is a much-enhanced, multi-platform version of the classic strace
program written orignally by Paul Kranenburg for SunOS and
subsequently modified by Branko Lankester for Linux.  strace traces
and decodes the system calls made by binary programs.  The programs do
not need not to be compiled specially to enable tracing so any program
can be traced.

To give you a feel for what strace can do, here is a sample trace of
the command "/sbin/scp /dev/null /dev/tty" where scp is a just a
statically-linked version of cp:

$ strace /sbin/scp /dev/null /dev/tty
brk(0)                                  = 0x11000
geteuid()                               = 314
umask(0)                                = 022
brk(0x14000)                            = 0x14000
brk(0x15000)                            = 0x15000
brk(0x16000)                            = 0x16000
lstat("/dev/tty", {st_mode=S_IFCHR|0666, st_rdev=makedev(5, 0), ...}) = 0
stat("/dev/tty", {st_mode=S_IFCHR|0666, st_rdev=makedev(5, 0), ...}) = 0
stat("/dev/null", {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 3), ...}) = 0
stat("/dev/tty", {st_mode=S_IFCHR|0666, st_rdev=makedev(5, 0), ...}) = 0
open("/dev/null", O_RDONLY)             = 3
open("/dev/tty", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 4
fstat(4, {st_mode=S_IFCHR|0666, st_rdev=makedev(5, 0), ...}) = 0
read(3, "", 1024)                       = 0
close(4)                                = 0
close(3)                                = 0
fstat(2, {st_mode=S_IFREG|0644, st_size=889, ...}) = 0
brk(0x17000)                            = 0x17000
fstat(1, {st_mode=S_IFCHR|0622, st_rdev=makedev(4, 2), ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
_exit(0)                                = ?
$

The careful eye will find a small discrepancy in this trace.

Changes from versions 2.x to version 3.0
========================================

* filename arguments are neither abbreviated nor stringified
* string arguments are now true C strings using octal instead of hex by default
* preprocessor constants are never shortened (e.g. was RDONLY => now O_RDONLY)
* by default the output for multiple processes now goes into one file
* all structures, vectors, bitsets, etc. use consistent output formats
* the -c option now means count calls, -i does what the old -c used to do

New Features in version 3.0
===========================

* non-ascii strings can be optionally printed entirely in hex
* the output format is readable when mutiple processes are generating output
* exit values are printed in an alignment column
* is is possible to suppress messages about attaching and detaching
* various tracing features can be enabled on a per syscall/signal/desc basis
* selective tracing of syscalls
* selective printing of syscall structures
* selective abbreviation of long structures on a per syscall basis
* selective printing of raw syscall arguments and results
* selective tracing of signals
* selective dumping of all I/O read from file descriptors
* selective dumping of all I/O written to file descriptors
* optional counting of time, calls, and errors for each syscall

Please send bug reports and enhancements to Rick Sladkey <[email-masked]>.

Messages of thanks and encouragement can be sent to:

	Paul Kranenburg <[email-masked]>
	Branko Lankester <[email-masked]>
	Rick Sladkey <[email-masked]>

--
Mail submissions for comp.os.linux.announce to: [email-masked]
PLEASE remember Keywords: and a short description of the software.