From owner-freebsd-hackers Fri Jul 3 05:22:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA20486 for freebsd-hackers-outgoing; Fri, 3 Jul 1998 05:22:23 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA20480 for ; Fri, 3 Jul 1998 05:22:21 -0700 (PDT) (envelope-from kuku@gilberto.physik.RWTH-Aachen.DE) Received: from gilberto.physik.RWTH-Aachen.DE (gilberto.physik.rwth-aachen.de [137.226.30.2]) by freefall.freebsd.org (8.8.8/8.8.5) with ESMTP id FAA18383 for ; Fri, 3 Jul 1998 05:20:57 -0700 (PDT) Received: (from kuku@localhost) by gilberto.physik.RWTH-Aachen.DE (8.8.8/8.8.7) id OAA20970; Fri, 3 Jul 1998 14:21:48 +0200 (MEST) (envelope-from kuku) Message-ID: <19980703142147.60917@gil.physik.rwth-aachen.de> Date: Fri, 3 Jul 1998 14:21:47 +0200 From: Christoph Kukulies To: "Jonathan M. Bresler" Cc: Christoph Kukulies , freebsd-hackers@freefall.cdrom.com Subject: Re: trace/KTRACE References: <199807030924.LAA20365@gilberto.physik.RWTH-Aachen.DE> <199807031155.EAA15761@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.81e In-Reply-To: <199807031155.EAA15761@hub.freebsd.org>; from Jonathan M. Bresler on Fri, Jul 03, 1998 at 04:55:26AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Jul 03, 1998 at 04:55:26AM -0700, Jonathan M. Bresler wrote: > 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? Yes, exactly. /usr/bin/truss is the solution. > > 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 -- --Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message