Annotation of src/usr.bin/kdump/kdump.1, Revision 1.40
1.40 ! deraadt 1: .\" $OpenBSD: kdump.1,v 1.39 2023/11/09 15:43:28 kn Exp $
1.7 aaron 2: .\"
1.1 deraadt 3: .\" Copyright (c) 1990, 1993
4: .\" The Regents of the University of California. All rights reserved.
5: .\"
6: .\" Redistribution and use in source and binary forms, with or without
7: .\" modification, are permitted provided that the following conditions
8: .\" are met:
9: .\" 1. Redistributions of source code must retain the above copyright
10: .\" notice, this list of conditions and the following disclaimer.
11: .\" 2. Redistributions in binary form must reproduce the above copyright
12: .\" notice, this list of conditions and the following disclaimer in the
13: .\" documentation and/or other materials provided with the distribution.
1.10 millert 14: .\" 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 15: .\" may be used to endorse or promote products derived from this software
16: .\" without specific prior written permission.
17: .\"
18: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28: .\" SUCH DAMAGE.
29: .\"
30: .\" from: @(#)kdump.1 8.1 (Berkeley) 6/6/93
31: .\"
1.40 ! deraadt 32: .Dd $Mdocdate: November 9 2023 $
1.1 deraadt 33: .Dt KDUMP 1
1.5 aaron 34: .Os
1.1 deraadt 35: .Sh NAME
36: .Nm kdump
37: .Nd display kernel trace data
38: .Sh SYNOPSIS
39: .Nm kdump
1.24 guenther 40: .Op Fl dHlnRTXx
1.1 deraadt 41: .Op Fl f Ar file
42: .Op Fl m Ar maxdata
1.39 kn 43: .Op Fl P Ar program
1.8 deraadt 44: .Op Fl p Ar pid
1.34 schwarze 45: .Op Fl t Ar trstr
1.36 otto 46: .Op Fl u Ar label
1.1 deraadt 47: .Sh DESCRIPTION
1.6 aaron 48: .Nm
1.1 deraadt 49: displays the kernel trace files produced with
50: .Xr ktrace 1
1.4 aaron 51: in human-readable format.
1.1 deraadt 52: By default, the file
53: .Pa ktrace.out
1.9 deraadt 54: in the current directory is displayed, unless overridden by the
1.6 aaron 55: .Fl f
56: option.
1.1 deraadt 57: .Pp
58: The options are as follows:
1.6 aaron 59: .Bl -tag -width Ds
1.1 deraadt 60: .It Fl d
61: Display all numbers in decimal.
1.6 aaron 62: By default, values are printed out in hexadecimal.
1.5 aaron 63: .It Fl f Ar file
1.1 deraadt 64: Display the specified file instead of
65: .Pa ktrace.out .
1.33 tedu 66: Specifying
67: .Sq -
68: will read from standard input.
1.22 mikeb 69: .It Fl H
70: Display thread identifiers.
1.1 deraadt 71: .It Fl l
72: Loop reading the trace file, once the end-of-file is reached, waiting for
73: more data.
1.5 aaron 74: .It Fl m Ar maxdata
1.1 deraadt 75: Display at most
76: .Ar maxdata
1.12 jmc 77: bytes when decoding I/O.
1.1 deraadt 78: .It Fl n
79: Suppress ad hoc translations.
80: Normally
1.6 aaron 81: .Nm
1.4 aaron 82: tries to decode many system calls into a more human-readable format.
1.1 deraadt 83: For example,
84: .Xr ioctl 2
85: values are replaced with the macro name and
86: .Va errno
87: values are replaced with the
88: .Xr strerror 3
89: string.
90: Suppressing this feature yields a more consistent output format and is
91: easily amenable to further processing.
1.39 kn 92: .It Fl P Ar program
93: Show output only for processes with
94: .Ar program
95: as their command name.
1.8 deraadt 96: .It Fl p Ar pid
97: Show output only for the
98: .Ar pid
99: specified.
1.1 deraadt 100: .It Fl R
101: Display relative timestamps (time since previous entry).
102: .It Fl T
1.15 jmc 103: Display absolute timestamps for each entry (seconds since the Epoch).
1.31 tedu 104: .It Fl TR
105: If both options are specified, display timestamps relative to trace start.
1.34 schwarze 106: .It Fl t Ar trstr
107: Select which tracepoints to display.
1.38 naddy 108: The argument can contain one or more of the following letters.
109: By default all trace points except for
110: .Cm X
111: are enabled.
112: .Pp
113: .Bl -tag -width flag -offset indent -compact
114: .\" Keep this list in sync with ktrace(1) and ltrace(1).
115: .It Cm c
116: trace system calls
117: .It Cm i
118: trace I/O
119: .It Cm n
120: trace namei translations
121: .It Cm p
122: trace violation of
123: .Xr pledge 2
124: restrictions
125: .It Cm s
126: trace signal processing
1.40 ! deraadt 127: .It Cm S
! 128: trace violation of
! 129: .Xr pinsyscalls 2
1.38 naddy 130: .It Cm t
131: trace various structures
132: .It Cm u
133: trace user data coming from
134: .Xr utrace 2
135: .It Cm x
136: trace argument vector in
137: .Xr execve 2
138: .It Cm X
139: trace environment in
140: .Xr execve 2
141: .It Cm +
142: trace the default points
143: .El
1.36 otto 144: .It Fl u Ar label
145: Display
146: .Xr utrace 2
147: tracepoints having
1.37 jmc 148: .Xr utrace 2
1.36 otto 149: label
150: .Ar label
151: as strings with
152: .Xr vis 3
153: escaping, without
154: .Xr ktrace 2
155: header information.
1.14 jmc 156: .It Fl X
157: Display I/O data with hexadecimal data and printable ASCII characters
158: side by side.
1.13 tedu 159: .It Fl x
160: Display I/O data in hexadecimal.
1.1 deraadt 161: .El
1.36 otto 162: .Pp
163: The
164: .Fl t
165: and
166: .Fl u
1.37 jmc 167: options are mutually exclusive;
1.36 otto 168: the last one specified overrides any previous ones.
1.6 aaron 169: .Sh FILES
170: .Bl -tag -width ktrace.out -compact
171: .It Pa ktrace.out
172: default ktrace dump file
173: .El
1.1 deraadt 174: .Sh SEE ALSO
175: .Xr ktrace 1
176: .Sh HISTORY
177: The
1.6 aaron 178: .Nm
1.4 aaron 179: command appeared in
1.35 jsg 180: .Bx 4.3 Reno .