Commit Graph

12 Commits

Author SHA1 Message Date
jhb
df51d482a8 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.

While here, fix some bugs from when this was Capsicum-ized:
- Use caph_limit_stream() for the output stream so that isatty() works
  and the output can be line-buffered (especially useful for live
  mode).
- Use caph_limit_stderr() to permit error messages to be displayed if
  an error occurs after cap_enter().

Reviewed by:	kib, 0mp (manpage)
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D17315
2018-10-22 21:25:28 +00:00
jhb
c94cf013f1 Change ktrdump to use the more standard -M/-N flags to specify the path
to a crash dump and kernel, respectively.  The existing -m/-e flags are
still supported for backwards compatiblity but are no longer documented.

Requested by:	np
MFC after:	2 weeks
2015-02-06 19:41:23 +00:00
bapt
1f77f137dc use .Mt to mark up email addresses consistently (part3)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:23:05 +00:00
dchagin
a553f5bca5 Add -H flag to print thread id. 2011-01-26 06:36:14 +00:00
ru
19aa3916e2 Markup and wording fixes.
Approved by:	re (blanket)
2005-06-14 11:50:53 +00:00
hmp
d059351ca6 Document the '-i' option which allows the user to specify a ktr events
log file.
2005-03-08 06:58:56 +00:00
ru
9f45c1d92e mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
rwatson
ba22e917d3 Add a "-r" flag to ktrdump(1) to print relative timestamps when used
with "-t" rather than absolute timestamps.  This allows the reader
to get a better sense of latency between events, such as time to
schedule an interrupt thread from time the interrupt occurred.  Assert
a copyright on ktrdump.c since I seem to be modifying it more than I
thought.
2004-05-22 08:26:10 +00:00
rwatson
222404c032 Add a quiet mode to ktrdump(1): if the "-q" flag is used, don't print
the pretty text header on top of the output.  Simplifies feeding the
results of tracing into a script for mechanical processing.
2004-05-21 21:24:58 +00:00
charnier
abd215c87f The .Nm utility 2002-07-14 15:12:00 +00:00
ru
2ea5b96e91 mdoc(7) police: fixed typo, minor markup nits. 2002-05-30 13:52:18 +00:00
jake
6da8075a30 Add a man page.
Submitted by:	davidc
2002-04-02 04:26:37 +00:00