From owner-freebsd-hackers Fri Jul 3 04:55:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA15771 for freebsd-hackers-outgoing; Fri, 3 Jul 1998 04:55:35 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: (from jmb@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA15761; Fri, 3 Jul 1998 04:55:26 -0700 (PDT) (envelope-from jmb) From: "Jonathan M. Bresler" Message-Id: <199807031155.EAA15761@hub.freebsd.org> Subject: Re: trace/KTRACE In-Reply-To: <199807030924.LAA20365@gilberto.physik.RWTH-Aachen.DE> from Christoph Kukulies at "Jul 3, 98 11:24:53 am" To: kuku@gilberto.physik.RWTH-Aachen.DE (Christoph Kukulies) Date: Fri, 3 Jul 1998 04:55:26 -0700 (PDT) Cc: freebsd-hackers@freefall.cdrom.com X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Christoph Kukulies wrote: > > Or are there any other ways (other than profiling, which is also an a > posteriori method) to 'watch' what an app does? Sean Eric Fagan (sp?) wrote a truss for FreeBSD. write-up appeared in Dr Dobb's Journal. is this what you are looking for? Aspen:[10] truss cat /etc/resolv.conf syscall open("/etc/resolv.conf",0,00) returns 3 (0x3) syscall fstat(1,0xefbfd754) returns 0 (0x0) syscall readlink("/etc/malloc.conf",0xefbfd6e0,63) errno 2 'No such file or directory' syscall mmap(0x0,4096,0x3,0x1002,-1,0x0) returns 536924160 (0x2000d000) syscall break(0x12000) returns 0 (0x0) syscall break(0x22000) returns 0 (0x0) syscall read(0x3,0x12000,0x10000) returns 161 (0xa1) search frb.gov covance.com atinc.com namsserver 192.168.250.1 # ourselves nameserver 198.35.131.208 # primary.frb.gov nameserver 198.35.166.183 # irmmp4.frb.gov syscall write(1,0x12000,161) returns 161 (0xa1) syscall read(0x3,0x12000,0x10000) returns 0 (0x0) syscall close(3) returns 0 (0x0) syscall close(1) returns 0 (0x0) syscall exit(0x0) process exit, rval = 0 jmb To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message