]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/crashinfo/crashinfo.8
efibootmgr: support '-b bootXXXX' as an alias for '-b XXXX'
[FreeBSD/FreeBSD.git] / usr.sbin / crashinfo / crashinfo.8
1 .\" Copyright (c) 2008 Yahoo!, Inc.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the author nor the names of any co-contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .Dd December 2, 2020
29 .Dt CRASHINFO 8
30 .Os
31 .Sh NAME
32 .Nm crashinfo
33 .Nd "analyze a core dump of the operating system"
34 .Sh SYNOPSIS
35 .Nm
36 .Op Fl d Ar crashdir
37 .Op Fl n Ar dumpnr
38 .Op Fl k Ar kernel
39 .Op Ar core
40 .Sh DESCRIPTION
41 The
42 .Nm
43 utility analyzes a core dump saved by
44 .Xr savecore 8 .
45 It generates a text file containing the analysis in the same directory as
46 the core dump.
47 For a given core dump file named
48 .Pa vmcore.XX
49 the generated text file will be named
50 .Pa core.txt.XX .
51 .Pp
52 By default,
53 .Nm
54 analyzes the most recent core dump in the core dump directory.
55 A specific core dump may be specified via either the
56 .Ar core
57 or
58 .Ar dumpnr
59 arguments.
60 Once
61 .Nm
62 has located a core dump,
63 it analyzes the core dump to determine the exact version of the kernel
64 that generated the core.
65 It then looks for a matching kernel file under each of the subdirectories in
66 .Pa /boot .
67 The location of the kernel file can also be explicitly provided via the
68 .Ar kernel
69 argument.
70 .Pp
71 Once
72 .Nm
73 has located a core dump and kernel,
74 it uses several utilities to analyze the core including
75 .Xr dmesg 8 ,
76 .Xr fstat 1 ,
77 .Xr iostat 8 ,
78 .Xr ipcs 1 ,
79 .Xr kgdb 1 Pq Pa ports/devel/gdb ,
80 .Xr netstat 1 ,
81 .Xr nfsstat 1 ,
82 .Xr ps 1 ,
83 .Xr pstat 8 ,
84 and
85 .Xr vmstat 8 .
86 Note that kgdb must be installed from the devel/gdb port or gdb package.
87 .Pp
88 The options are as follows:
89 .Bl -tag -width indent
90 .It Fl b
91 Run in batch mode.
92 Write most messages to the
93 .Pa core.txt.XX
94 file instead of the terminal.
95 This flag is used when
96 .Nm
97 is run during boot.
98 .It Fl d Ar crashdir
99 Specify an alternate core dump directory.
100 The default crash dump directory is
101 .Pa /var/crash .
102 .It Fl n Ar dumpnr
103 Use the core dump saved in
104 .Pa vmcore. Ns Ar dumpnr
105 instead of the latest core in the core dump directory.
106 .It Fl k Ar kernel
107 Specify an explicit kernel file.
108 .El
109 .Sh SEE ALSO
110 .Xr textdump 4 ,
111 .Xr savecore 8
112 .Sh HISTORY
113 The
114 .Nm
115 utility appeared in
116 .Fx 6.4 .