From owner-freebsd-current@FreeBSD.ORG Thu Jun 28 08:43:40 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1A4316A468 for ; Thu, 28 Jun 2007 08:43:40 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id B6D6C13C44C for ; Thu, 28 Jun 2007 08:43:40 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 523C146F20; Thu, 28 Jun 2007 04:43:40 -0400 (EDT) Date: Thu, 28 Jun 2007 09:43:40 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Howard Su In-Reply-To: Message-ID: <20070628094219.W9286@fledge.watson.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: current@freebsd.org Subject: Re: concept prove patch for ktrace output to all file types X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2007 08:43:41 -0000 On Thu, 28 Jun 2007, Howard Su wrote: > This is a concept prove patch for ktrace. In order to make ktrace write to > stdout, /dev/xxx, fifo file, pipe, I changed ktrace syscall to accepting a > file handler instead of a file name. > > I just get a workable kernel patch. And i make as small as possible changes > to userland code. Now you can do something like: > #mkfifo foo > in session A: #kdump -f foo > in session B: #ktrace -f foo ls > > Then, you can see a real time output like truss did. > > Before moving forward (hacking userland), i want to get some feedback if my > changes in kernel part is the right direction to do. Appreciate your time. > > PS: The patch can be clearly apply to today's current. What happens to processes associated with the same or other ktrace sessions if one ktrace session stalls due to a fifo or pipe buffer filling? Robert N M Watson Computer Laboratory University of Cambridge