Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Feb 2005 10:28:24 -0800
From:      "Loren M. Lang" <lorenl@alzatex.com>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        FreeBSD Mailing list <freebsd-questions@freebsd.org>
Subject:   Re: ktrace as a replacement for strace
Message-ID:  <20050208182824.GG8619@alzatex.com>
In-Reply-To: <20050208181111.GC82752@dan.emsphone.com>
References:  <20050208115928.GE8619@alzatex.com> <20050208162429.GA82752@dan.emsphone.com> <20050208180233.GF8619@alzatex.com> <20050208181111.GC82752@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 08, 2005 at 12:11:11PM -0600, Dan Nelson wrote:
> 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

Wow, I used to use the -A argument all the time years ago to grep. Then
at some point I stopped finding a need for it and completely forgot
about that.  One problem with cui vs. gui, if you don't use a feature
often enough, you'll forget it even exists unless you check the manpage
constantly.  At least with guis, the limited features they offer are
always visible.

> 
> -- 
> 	Dan Nelson
> 	dnelson@allantgroup.com

-- 
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: B3B9 D669 69C9 09EC 1BCD  835A FAF3 7A46 E4A3 280C
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050208182824.GG8619>