tracing system calls
Brent Callaghan
brent%terra at Sun.COM
Fri Sep 2 05:53:44 AEST 1988
In article <2040 at cuuxb.ATT.COM>, dlm at cuuxb.ATT.COM (Dennis L. Mumaugh) writes:
> 1). We have a system call trace program that reports on each and
> every system call a process makes -- useful for support to figure
> out what a program REALLY is doing.
And how! Actually any SunOs 4.0 user can do that now with
the trace(1) command.
$ trace date
open ("/usr/lib/ld.so", 0, 021004) = 3
read (3, "".., 32) = 32
mmap (0, 139264, 5, 0x80000002, 3, 0) = 0xedda000
mmap (0xedfa000, 8192, 7, 0x80000012, 3, 16384) = 0xedfa000
munmap (0xedde000, 114688) = 0
open ("/dev/zero", 0, 021112) = 6
close (3) = 0
getrlimit (3, 0xefffbc0) = 0
mmap (0xee00000, 8192, 3, 0x80000012, 6, 0) = 0xee00000
getuid () = 3497
getgid () = 10
open ("/etc/ld.so.cache", 0, 01670000000) = 3
fstat (3, 0xefffb18) = 0
mmap (0, 8192, 1, 0x80000001, 3, 0) = 0xedf4000
close (3) = 0
open ("/usr/lib/libc.so.0.10", 0, 01667720000) = 3
read (3, "".., 32) = 32
mmap (0, 409600, 5, 0x80000002, 3, 0) = 0xed72000
mmap (0xedd2000, 16384, 7, 0x80000012, 3, 286720) = 0xedd2000
munmap (0xedb8000, 106496) = 0
close (3) = 0
close (6) = 0
getpagesize () = 8192
brk (0x225a0) = 0
brk (0x245a4) = 0
gettimeofday (0x20558, 0) = 0
gettimeofday (0x20558, 0) = 0
open ("/usr/share/lib/zoneinfo/localtim".., 0, 01) = 3
read (3, "".., 8192) = 754
close (3) = 0
ioctl (1, 0x40125401, 0xefff26c) = 0
write (1, "Thu Sep 1 12:48:29 PDT 1988\n", 29)
Thu Sep 1 12:48:29 PDT 1988
= 29
close (0) = 0
close (1) = 0
close (2) = 0
exit (0) = ?
$
Made in New Zealand --> Brent Callaghan @ Sun Microsystems
uucp: sun!bcallaghan
phone: (415) 336 6188
More information about the Comp.unix.wizards
mailing list