Commit Graph

12 Commits

Author SHA1 Message Date
John Baldwin
4403657034 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
John Baldwin
330c544318 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
Baptiste Daroussin
2b7af31cf5 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
Dmitry Chagin
718f2aed09 Add -H flag to print thread id. 2011-01-26 06:36:14 +00:00
Ruslan Ermilov
39c59153e9 Markup and wording fixes.
Approved by:	re (blanket)
2005-06-14 11:50:53 +00:00
Hiten Pandya
9e1fb7fbad Document the '-i' option which allows the user to specify a ktr events
log file.
2005-03-08 06:58:56 +00:00
Ruslan Ermilov
2410103c1d mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
Robert Watson
7d8c7fe102 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
Robert Watson
7ddc893717 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
Philippe Charnier
084e19802d The .Nm utility 2002-07-14 15:12:00 +00:00
Ruslan Ermilov
35ff8c06b7 mdoc(7) police: fixed typo, minor markup nits. 2002-05-30 13:52:18 +00:00
Jake Burkholder
458e81c958 Add a man page.
Submitted by:	davidc
2002-04-02 04:26:37 +00:00