aboutsummaryrefslogtreecommitdiff
path: root/share/man/man4/ktr.4
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2001-03-12 09:05:59 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2001-03-12 09:05:59 +0000
commit8d458e5bdebffa4f70ded4839345d11dbe4b312b (patch)
tree1cc227162bf2de9e16dfbdafc06ca9a35ae7802d /share/man/man4/ktr.4
parente38cc86b60886052f47babeead6bfe9c586e6981 (diff)
downloadsrc-8d458e5bdebffa4f70ded4839345d11dbe4b312b.tar.gz
src-8d458e5bdebffa4f70ded4839345d11dbe4b312b.zip
mdoc(7) police: misc formatting fixes.
Notes
Notes: svn path=/head/; revision=74149
Diffstat (limited to 'share/man/man4/ktr.4')
-rw-r--r--share/man/man4/ktr.449
1 files changed, 30 insertions, 19 deletions
diff --git a/share/man/man4/ktr.4 b/share/man/man4/ktr.4
index e15dcab6b03a..dd530ade0bf5 100644
--- a/share/man/man4/ktr.4
+++ b/share/man/man4/ktr.4
@@ -45,31 +45,37 @@ facility allows kernel events to be logged while the kernel executes so that
they can be examined later when debugging.
The only mandatory option to enable
.Nm
-is "options KTR".
+is
+.Dq Li options KTR .
.Pp
-The "KTR_ENTRIES" option sets the size of the buffer of events.
+The
+.Dv KTR_ENTRIES
+option sets the size of the buffer of events.
It should be a power of two.
The size of the buffer in the currently running kernel can be found via the
read-only sysctl
-.Sy debug.ktr.entries .
+.Va debug.ktr.entries .
By default the buffer contains 1024 entries.
.Ss Event Masking
Event levels can be enabled or disabled to trim excessive and overly verbose
logging.
-First, a mask of events is specified at compile time via the "KTR_COMPILE"
+First, a mask of events is specified at compile time via the
+.Dv KTR_COMPILE
option to limit which events are actually compiled into the kernel.
The default value for this option is for all events to be enabled.
.Pp
Secondly, the actual events logged while the kernel runs can be further
masked via the run time event mask.
-The "KTR_MASK" option sets the default value of the run time event mask.
+The
+.Dv KTR_MASK
+option sets the default value of the run time event mask.
The runtime event mask can also be set by the
.Xr loader 8
via the
-.Sy debug.ktr.mask
+.Va debug.ktr.mask
environment variable.
It can also be examined and set after booting via the
-.Sy debug.ktr.mask
+.Va debug.ktr.mask
sysctl.
By default the run time mask is set to log only
.Dv KTR_GEN
@@ -78,9 +84,11 @@ The definitions of the event mask bits can be found in
.Aq Pa sys/ktr.h .
.Ss Extensions
The kernel can be configured to compile with several extensions to the base
-functionality via the "KTR_EXTEND" option.
+functionality via the
+.Dv KTR_EXTEND
+option.
These extensions can be checked for via the
-.Sy debug.ktr.extend
+.Va debug.ktr.extend
read-only sysctl.
It will be set to zero if the extensions are not compiled in and non-zero
if they are compiled in.
@@ -89,16 +97,18 @@ and line number that the event was logged from as well as the CPU on which
the current thread was executing when the event was logged.
.Pp
One extension is a CPU event mask whose default value can be changed via
-the "KTR_CPUMASK" option.
+the
+.Dv KTR_CPUMASK
+option.
A CPU must have the bit corresponding to its logical id set in this bitmask
for events that occur on it to be logged.
This mask can be set by the
.Xr loader 8
via the
-.Sy debug.ktr.cpumask
+.Va debug.ktr.cpumask
environment variable.
It can also be examined and set after booting via the
-.Sy debug.ktr.cpumask
+.Va debug.ktr.cpumask
sysctl.
By default events on all CPUs are enabled.
.Pp
@@ -118,9 +128,9 @@ By default, events are only logged to the internal buffer for examination
later, but if the verbose flag is set then they are dumped to the kernel
console as well.
This flag can also be set from the loader via the
-.Sy debug.ktr.verbose
+.Va debug.ktr.verbose
environment variable, or it can be examined and set after booting via the
-.Sy debug.ktr.verbose
+.Va debug.ktr.verbose
sysctl.
If the flag is set to zero, which is the default, then verbose output is
disabled.
@@ -129,24 +139,25 @@ number are printed to the kernel console.
If the flag is greater than one, then the filename and line number of the
event are output to the console in addition to the log message and the CPU
number.
-The "KTR_VERBOSE" option sets the flag to one.
+The
+.Dv KTR_VERBOSE
+option sets the flag to one.
.Ss Examining the Events
-.Pp
The KTR buffer can be examined from within
.Xr ddb 4
via the
-.Ic show ktr Op Ic /v
+.Ic show ktr Op Cm /v
command.
This command displays the contents of the trace buffer one page at a time.
At the
-.Dq --more--
+.Dq Li --more--
prompt, the Enter key displays one more entry and prompts again.
The spacebar displays another page of entries.
Any other key quits.
By default the timestamp, filename, and line number are not displayed with
each log entry.
If the
-.Op Ic /v
+.Cm /v
modifier is specified, then they are displayed in addition to the normal
output.
Note that the events are displayed in reverse chronological order.