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.\" 28a37f9716SJohn Baldwin.\" $FreeBSD$ 29a37f9716SJohn Baldwin.\" 30*1f1ed24cSEric van Gyzen.Dd April 19, 2017 31a37f9716SJohn Baldwin.Dt CRASHINFO 8 32a37f9716SJohn Baldwin.Os 33a37f9716SJohn Baldwin.Sh NAME 34a37f9716SJohn Baldwin.Nm crashinfo 35a37f9716SJohn Baldwin.Nd "analyze a core dump of the operating system" 36a37f9716SJohn Baldwin.Sh SYNOPSIS 37a37f9716SJohn Baldwin.Nm 38a37f9716SJohn Baldwin.Op Fl d Ar crashdir 39a37f9716SJohn Baldwin.Op Fl n Ar dumpnr 40a37f9716SJohn Baldwin.Op Fl k Ar kernel 41a37f9716SJohn Baldwin.Op Ar core 42a37f9716SJohn Baldwin.Sh DESCRIPTION 43a37f9716SJohn BaldwinThe 44a37f9716SJohn Baldwin.Nm 45a37f9716SJohn Baldwinutility analyzes a core dump saved by 46a37f9716SJohn Baldwin.Xr savecore 8 . 47a37f9716SJohn BaldwinIt generates a text file containing the analysis in the same directory as 48a37f9716SJohn Baldwinthe core dump. 49a37f9716SJohn BaldwinFor a given core dump file named 50a37f9716SJohn Baldwin.Pa vmcore.XX 51a37f9716SJohn Baldwinthe generated text file will be named 52a37f9716SJohn Baldwin.Pa core.txt.XX . 53a37f9716SJohn Baldwin.Pp 54a37f9716SJohn BaldwinBy default, 55a37f9716SJohn Baldwin.Nm 56a37f9716SJohn Baldwinanalyzes the most recent core dump in the core dump directory. 57a37f9716SJohn BaldwinA specific core dump may be specified via either the 58a37f9716SJohn Baldwin.Ar core 59a37f9716SJohn Baldwinor 60a37f9716SJohn Baldwin.Ar dumpnr 61a37f9716SJohn Baldwinarguments. 62a37f9716SJohn BaldwinOnce 63a37f9716SJohn Baldwin.Nm 64a37f9716SJohn Baldwinhas located a core dump, 65a37f9716SJohn Baldwinit analyzes the core dump to determine the exact version of the kernel 66a37f9716SJohn Baldwinthat generated the core. 67a37f9716SJohn BaldwinIt then looks for a matching kernel file under each of the subdirectories in 68a37f9716SJohn Baldwin.Pa /boot . 69a37f9716SJohn BaldwinThe location of the kernel file can also be explicitly provided via the 70a37f9716SJohn Baldwin.Ar kernel 71a37f9716SJohn Baldwinargument. 72a37f9716SJohn Baldwin.Pp 73a37f9716SJohn BaldwinOnce 74a37f9716SJohn Baldwin.Nm 75a37f9716SJohn Baldwinhas located a core dump and kernel, 76a37f9716SJohn Baldwinit uses several utilities to analyze the core including 77a37f9716SJohn Baldwin.Xr dmesg 8 , 78a37f9716SJohn Baldwin.Xr fstat 1 , 79a37f9716SJohn Baldwin.Xr iostat 8 , 80a37f9716SJohn Baldwin.Xr ipcs 1 , 81a37f9716SJohn Baldwin.Xr kgdb 1 , 82a37f9716SJohn Baldwin.Xr netstat 1 , 83a37f9716SJohn Baldwin.Xr nfsstat 1 , 84a37f9716SJohn Baldwin.Xr ps 1 , 85a37f9716SJohn Baldwin.Xr pstat 8 , 86a37f9716SJohn Baldwinand 87a37f9716SJohn Baldwin.Xr vmstat 8 . 88a37f9716SJohn Baldwin.Pp 89a37f9716SJohn BaldwinThe options are as follows: 90a37f9716SJohn Baldwin.Bl -tag -width indent 91*1f1ed24cSEric van Gyzen.It Fl b 92*1f1ed24cSEric van GyzenRun in batch mode. Write most messages to the 93*1f1ed24cSEric van Gyzen.Pa core.txt.XX 94*1f1ed24cSEric van Gyzenfile instead of the terminal. This flag is used when 95*1f1ed24cSEric van Gyzen.Nm 96*1f1ed24cSEric van Gyzenis run during boot. 97a37f9716SJohn Baldwin.It Fl d Ar crashdir 98a37f9716SJohn BaldwinSpecify an alternate core dump directory. 99a37f9716SJohn BaldwinThe default crash dump directory is 100a37f9716SJohn Baldwin.Pa /var/crash . 101a37f9716SJohn Baldwin.It Fl n Ar dumpnr 102a37f9716SJohn BaldwinUse the core dump saved in 103a37f9716SJohn Baldwin.Pa vmcore. Ns Ar dumpnr 104a37f9716SJohn Baldwininstead of the latest core in the core dump directory. 105a37f9716SJohn Baldwin.It Fl k Ar kernel 106a37f9716SJohn BaldwinSpecify an explicit kernel file. 107a37f9716SJohn Baldwin.El 108a37f9716SJohn Baldwin.Sh SEE ALSO 10920ba6b0dSRuslan Ermilov.Xr textdump 4 , 11020ba6b0dSRuslan Ermilov.Xr savecore 8 111a37f9716SJohn Baldwin.Sh HISTORY 112a37f9716SJohn BaldwinThe 113a37f9716SJohn Baldwin.Nm 114a37f9716SJohn Baldwinutility appeared in 1152a72feb4SChristian Brueffer.Fx 6.4 . 116