From owner-freebsd-questions@FreeBSD.ORG Tue Feb 8 18:11:15 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D7D0D16A4CE for ; Tue, 8 Feb 2005 18:11:15 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6671143D45 for ; Tue, 8 Feb 2005 18:11:13 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id j18IBB2P049805; Tue, 8 Feb 2005 12:11:11 -0600 (CST) (envelope-from dan) Date: Tue, 8 Feb 2005 12:11:11 -0600 From: Dan Nelson To: "Loren M. Lang" Message-ID: <20050208181111.GC82752@dan.emsphone.com> References: <20050208115928.GE8619@alzatex.com> <20050208162429.GA82752@dan.emsphone.com> <20050208180233.GF8619@alzatex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050208180233.GF8619@alzatex.com> X-OS: FreeBSD 5.3-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: FreeBSD Mailing list Subject: Re: ktrace as a replacement for strace X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2005 18:11:16 -0000 In the last episode (Feb 08), Loren M. Lang said: > On Tue, Feb 08, 2005 at 10:24:29AM -0600, Dan Nelson wrote: > > In the last episode (Feb 08), Loren M. Lang said: > > > I'm looking for a replacement for the strace program I used to > > > use on linux; freebsd has a port of strace, but it just hangs > > > everytime I use it. It looks like the bsd version of strace > > > would be ktrace/kdump. I was able to get these to print a trace > > > of the program I ran, but it doesn't do all the nice substatuting > > > that strace was able to do. Mainly, I just want the first > > > argument of open to look like a string instead of a 32 bit > > > pointer that I can't read. I'm trying to figure out what files > > > this program is trying to read so I can edit it's configuration > > > file. > > > > The string in the NAMI line immediately after an open() call is the > > filename in kdump output. > > Oh, I never noticed this since I was using grep to filter out the > open suyscalls. In strace everything is in one line. Is there > anything then that will work like the -e option in strace so I can > list just the syscalls I want to see? grep -A1 "CALL open" is about the best you can do -- Dan Nelson dnelson@allantgroup.com