DragonFly kernel List (threaded) for 2007-06
DragonFly BSD
DragonFly kernel List (threaded) for 2007-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: kernelspace -> userspace communication


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 4 Jun 2007 08:13:42 -0700 (PDT)

:I'd like to move some trivial kernel stats to userspace for further 
:examination. ktr seems ok for small amounts of data gathered in a small time 
:period. Periodically running ktrdump (polling the ktr indexes and using the 
:timestamps to know when you've missed any events) would probably work, but 
:it's a rather dumb solution. Am I missing some other mechanism?
:
:Thanks,
:Aggelos

    KTR is the best way to log realtime data.

    The kernel just maintains a per-cpu memory buffer and operates it like
    a FIFO, with a revovling read and write index.  There is nothing
    preventing ktrdump from sticking around and polling the FIFO for
    new events, then only reporting the new information.

    It would take maybe an hour for a good programmer to modify ktrdump to
    do that.  It isn't difficult at all.  I eagerly away your patch! :-)

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]