Date: 9 Nov 1999 16:11:48 -0000 From: vladimir@math.uic.edu To: freebsd-questions@FreeBSD.ORG, grog@lemis.com, vladimir-freebsd-questions@math.uic.edu Subject: Re: ktrace'ing a running process Message-ID: <19991109161148.2528.qmail@math.uic.edu>
next in thread | raw e-mail | index | archive | help
>From grog@mojave.sitaranetworks.com Tue Nov 09 16:00:15 1999 >Delivered-To: vladimir-freebsd-questions@math.uic.edu >Date: Tue, 9 Nov 1999 10:59:34 -0500 >From: Greg Lehey <grog@mojave.sitaranetworks.com> >To: vladimir-freebsd-questions@math.uic.edu, freebsd-questions@FreeBSD.ORG >Subject: Re: ktrace'ing a running process >Mime-Version: 1.0 > >On Tuesday, 9 November 1999 at 15:53:00 -0000, vladimir-freebsd-questions@math.uic.edu wrote: >> I ran into a problem: ktrace -p PID produces >> a 0 length file ktrace.out, and ktrace exits >> immediately. The system is FBSD-3.3-STABLE. >> What am I doing wrong? > >Not much. You're probably just assuming that it's a bug for ktrace to >exit immediately, and in fact it's a feature. To stop the trace, >enter 'ktrace -p PID -C'. > >The real question is: why is your process not producing any ktrace >output? It may not be running, or it may be looping in user space. >Remember that ktrace shows only the transitions between user and >kernel space. If you don't have any such transitions, you won't get >any output. > >What does 'ps lp PID' say? > >Greg Ah, you are right. I wrote a c program that does stat on a file in a loop; this one produced the output. I assumed ktrace should just wait until it detects interaction with the kernel, but it looks like it just exits. Thanks! Vladimir To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991109161148.2528.qmail>