: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 
                                        <[EMAIL PROTECTED]>

Reply via email to