1a37f9716SJohn Baldwin.\" Copyright (c) 2008 Yahoo!, Inc. 2a37f9716SJohn Baldwin.\" All rights reserved. 3a37f9716SJohn Baldwin.\" 4a37f9716SJohn Baldwin.\" Redistribution and use in source and binary forms, with or without 5a37f9716SJohn Baldwin.\" modification, are permitted provided that the following conditions 6a37f9716SJohn Baldwin.\" are met: 7a37f9716SJohn Baldwin.\" 1. Redistributions of source code must retain the above copyright 8a37f9716SJohn Baldwin.\" notice, this list of conditions and the following disclaimer. 9a37f9716SJohn Baldwin.\" 2. Redistributions in binary form must reproduce the above copyright 10a37f9716SJohn Baldwin.\" notice, this list of conditions and the following disclaimer in the 11a37f9716SJohn Baldwin.\" documentation and/or other materials provided with the distribution. 12a37f9716SJohn Baldwin.\" 3. Neither the name of the author nor the names of any co-contributors 13a37f9716SJohn Baldwin.\" may be used to endorse or promote products derived from this software 14a37f9716SJohn Baldwin.\" without specific prior written permission. 15a37f9716SJohn Baldwin.\" 16a37f9716SJohn Baldwin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17a37f9716SJohn Baldwin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18a37f9716SJohn Baldwin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19a37f9716SJohn Baldwin.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20a37f9716SJohn Baldwin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21a37f9716SJohn Baldwin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22a37f9716SJohn Baldwin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23a37f9716SJohn Baldwin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24a37f9716SJohn Baldwin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25a37f9716SJohn Baldwin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26a37f9716SJohn Baldwin.\" SUCH DAMAGE. 27a37f9716SJohn Baldwin.\" 2855e6cbc4SEd Maste.Dd December 2, 2020 29a37f9716SJohn Baldwin.Dt CRASHINFO 8 30a37f9716SJohn Baldwin.Os 31a37f9716SJohn Baldwin.Sh NAME 32a37f9716SJohn Baldwin.Nm crashinfo 33a37f9716SJohn Baldwin.Nd "analyze a core dump of the operating system" 34a37f9716SJohn Baldwin.Sh SYNOPSIS 35a37f9716SJohn Baldwin.Nm 36a37f9716SJohn Baldwin.Op Fl d Ar crashdir 37a37f9716SJohn Baldwin.Op Fl n Ar dumpnr 38a37f9716SJohn Baldwin.Op Fl k Ar kernel 39a37f9716SJohn Baldwin.Op Ar core 40a37f9716SJohn Baldwin.Sh DESCRIPTION 41a37f9716SJohn BaldwinThe 42a37f9716SJohn Baldwin.Nm 43a37f9716SJohn Baldwinutility analyzes a core dump saved by 44a37f9716SJohn Baldwin.Xr savecore 8 . 45a37f9716SJohn BaldwinIt generates a text file containing the analysis in the same directory as 46a37f9716SJohn Baldwinthe core dump. 47a37f9716SJohn BaldwinFor a given core dump file named 48a37f9716SJohn Baldwin.Pa vmcore.XX 49a37f9716SJohn Baldwinthe generated text file will be named 50a37f9716SJohn Baldwin.Pa core.txt.XX . 51a37f9716SJohn Baldwin.Pp 52a37f9716SJohn BaldwinBy default, 53a37f9716SJohn Baldwin.Nm 54a37f9716SJohn Baldwinanalyzes the most recent core dump in the core dump directory. 55a37f9716SJohn BaldwinA specific core dump may be specified via either the 56a37f9716SJohn Baldwin.Ar core 57a37f9716SJohn Baldwinor 58a37f9716SJohn Baldwin.Ar dumpnr 59a37f9716SJohn Baldwinarguments. 60a37f9716SJohn BaldwinOnce 61a37f9716SJohn Baldwin.Nm 62a37f9716SJohn Baldwinhas located a core dump, 63a37f9716SJohn Baldwinit analyzes the core dump to determine the exact version of the kernel 64a37f9716SJohn Baldwinthat generated the core. 65a37f9716SJohn BaldwinIt then looks for a matching kernel file under each of the subdirectories in 66a37f9716SJohn Baldwin.Pa /boot . 67a37f9716SJohn BaldwinThe location of the kernel file can also be explicitly provided via the 68a37f9716SJohn Baldwin.Ar kernel 69a37f9716SJohn Baldwinargument. 70a37f9716SJohn Baldwin.Pp 71a37f9716SJohn BaldwinOnce 72a37f9716SJohn Baldwin.Nm 73a37f9716SJohn Baldwinhas located a core dump and kernel, 74a37f9716SJohn Baldwinit uses several utilities to analyze the core including 75a37f9716SJohn Baldwin.Xr dmesg 8 , 76a37f9716SJohn Baldwin.Xr fstat 1 , 77a37f9716SJohn Baldwin.Xr iostat 8 , 78a37f9716SJohn Baldwin.Xr ipcs 1 , 79*4ee44ffcSJens Schweikhardt.Xr kgdb 1 Pq Pa ports/devel/gdb , 80a37f9716SJohn Baldwin.Xr netstat 1 , 81a37f9716SJohn Baldwin.Xr nfsstat 1 , 82a37f9716SJohn Baldwin.Xr ps 1 , 83a37f9716SJohn Baldwin.Xr pstat 8 , 84a37f9716SJohn Baldwinand 85a37f9716SJohn Baldwin.Xr vmstat 8 . 8655e6cbc4SEd MasteNote that kgdb must be installed from the devel/gdb port or gdb package. 87a37f9716SJohn Baldwin.Pp 88a37f9716SJohn BaldwinThe options are as follows: 89a37f9716SJohn Baldwin.Bl -tag -width indent 901f1ed24cSEric van Gyzen.It Fl b 9126762c66SGordon BerglingRun in batch mode. 9226762c66SGordon BerglingWrite most messages to the 931f1ed24cSEric van Gyzen.Pa core.txt.XX 9426762c66SGordon Berglingfile instead of the terminal. 9526762c66SGordon BerglingThis flag is used when 961f1ed24cSEric van Gyzen.Nm 971f1ed24cSEric van Gyzenis run during boot. 98a37f9716SJohn Baldwin.It Fl d Ar crashdir 99a37f9716SJohn BaldwinSpecify an alternate core dump directory. 100a37f9716SJohn BaldwinThe default crash dump directory is 101a37f9716SJohn Baldwin.Pa /var/crash . 102a37f9716SJohn Baldwin.It Fl n Ar dumpnr 103a37f9716SJohn BaldwinUse the core dump saved in 104a37f9716SJohn Baldwin.Pa vmcore. Ns Ar dumpnr 105a37f9716SJohn Baldwininstead of the latest core in the core dump directory. 106a37f9716SJohn Baldwin.It Fl k Ar kernel 107a37f9716SJohn BaldwinSpecify an explicit kernel file. 108a37f9716SJohn Baldwin.El 109a37f9716SJohn Baldwin.Sh SEE ALSO 11020ba6b0dSRuslan Ermilov.Xr textdump 4 , 11120ba6b0dSRuslan Ermilov.Xr savecore 8 112a37f9716SJohn Baldwin.Sh HISTORY 113a37f9716SJohn BaldwinThe 114a37f9716SJohn Baldwin.Nm 115a37f9716SJohn Baldwinutility appeared in 1162a72feb4SChristian Brueffer.Fx 6.4 . 117