Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Feb 2008 22:05:21 +1100
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>
Cc:        freebsd-current@freebsd.org
Subject:   Re: [src] cvs commit: src/include unistd.h src/lib/libc/sys readlink.2 src/sys/compat/freebsd32 syscalls.master src/sys/kern syscalls.master vfs_syscalls.c src/sys/sys syscallsubr.h
Message-ID:  <20080218110521.GQ64299@server.vk2pj.dyndns.org>
In-Reply-To: <200802181513.42681.doconnor@gsoft.com.au>
References:  <200802122009.m1CK94Y8026959@repoman.freebsd.org> <200802181004.21379.doconnor@gsoft.com.au> <20080218040625.GA8141@kobe.laptop> <200802181513.42681.doconnor@gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help

--OxDG9cJJSSQMUzGF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Feb 18, 2008 at 03:13:35PM +1030, Daniel O'Connor wrote:
>I didn't realise that the file descriptor used to write tracing data out=
=20
>was 'owned' by the process being traced, I always thought ktrace did.

Unlike truss/ptrace type tools, ktrace just sets a flag in the process
that tells the kernel to generate ktrace records.  This is more obvious
when you use the 'ktrace -p PID' form.

On Mon, 18 Feb 2008, Giorgos Keramidas wrote:
>> It is probably easy to add an -F flag to ktrace/kdump which would
>> inhibit the check for a `regular' file, so you could then write:
>>
>> 	( ktrace -aF -f /dev/stdout ls ) | \
>> 	  kdump -F -f /dev/stdin

I don't think stdin/stdout is practical here but supporting named
pipes sounds like it would be useful.

>I guess it couldn't be moved to ktrace without rearchitecting how=20
>ktracing works so the ktrace process sticks around writing stuff out to=20
>disk.

And from what I've seen of the innards of ktrace, the re-architecting
would be quite significant.

--=20
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.

--OxDG9cJJSSQMUzGF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFHuWZx/opHv/APuIcRAtkWAJ9YYSjclbypFcSnd7KRk8ARBNQJkACdFS2y
sYkxCEqNMRw9i4XDwtXfka4=
=iLxu
-----END PGP SIGNATURE-----

--OxDG9cJJSSQMUzGF--



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