]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 339620: Add a "live" mode to ktrdump.
authorjhb <jhb@FreeBSD.org>
Wed, 2 Jan 2019 19:48:17 +0000 (19:48 +0000)
committerjhb <jhb@FreeBSD.org>
Wed, 2 Jan 2019 19:48:17 +0000 (19:48 +0000)
commit5c8a34df3f7503c8fa5209c4fb49708cac622723
tree1896418aaaddb781fca0c0b877057561e0add879
parent261ef81beafdd345090d5fd259ab07f4ab26ff2a
MFC 339620: Add a "live" mode to ktrdump.

Support a "live" mode in ktrdump enabled via the -l flag.  In this
mode, ktrdump polls the kernel's trace buffer periodically (currently
hardcoded as a 50 millisecond interval) and dumps any newly added
entries.  Fancier logic for the timeout (e.g. a command line option or
some kind of backoff based on the time since the last entry) can be
added later as the need arises.

Note that this does not include the capsicum fixes from the original
commit since ktrdump in stable/11 is not capsicum-ized.
usr.bin/ktrdump/ktrdump.8
usr.bin/ktrdump/ktrdump.c