Print this page
NEX-9338 improve the layout of the crash directory
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Steve Peng <steve.peng@nexenta.com>
   1 '\" te
   2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
   3 .\" Copyright (c) 1983 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
   4 .\" Copyright 2013 Nexenta Systems, Inc.  All Rights Reserved.
   5 .TH SAVECORE 1M "Jan 30, 2013"
   6 .SH NAME
   7 savecore \- save a crash dump of the operating system
   8 .SH SYNOPSIS
   9 .LP
  10 .nf
  11 \fB/usr/bin/savecore\fR [\fB-Lvd\fR] [\fB-f\fR \fIdumpfile\fR] [\fIdirectory\fR]
  12 .fi
  13 
  14 .SH DESCRIPTION
  15 .sp
  16 .LP
  17 The \fBsavecore\fR utility saves a crash dump of the kernel (assuming that one
  18 was made) and writes a reboot message in the shutdown log. By default, it is
  19 invoked by the \fBdumpadm\fR service each time the system boots.
  20 .sp
  21 .LP
  22 Depending on the \fBdumpadm\fR(1M) configuration \fBsavecore\fR saves either
  23 the compressed or uncompressed crash dump. The compressed crash dump is saved in
  24 the file \fIdirectory\fR\fB/vmdump.\fR\fIn\fR.

  25 \fBsavecore\fR saves the uncompressed crash dump data in the file
  26 \fIdirectory\fR\fB/vmcore.\fR\fIn\fR and the kernel's namelist in
  27 \fIdirectory\fR\fB/unix.\fR\fIn.\fR The trailing \fIn\fR in the
  28 pathnames is replaced by a number which grows every time \fBsavecore\fR is run
  29 in that directory.
  30 .sp
  31 .LP
  32 Before writing out a crash dump, \fBsavecore\fR reads a number from the file
  33 \fIdirectory\fR\fB/minfree\fR. This is the minimum number of kilobytes that
  34 must remain free on the file system containing \fIdirectory\fR. If after saving
  35 the crash dump the file system containing \fIdirectory\fR would have less free
  36 space the number of kilobytes specified in \fBminfree\fR, the crash dump is not
  37 saved. if the \fBminfree\fR file does not exist, \fBsavecore\fR assumes a
  38 \fBminfree\fR value of 1 megabyte.
  39 .sp
  40 .LP
  41 The \fBsavecore\fR utility also logs a reboot message using facility
  42 \fBLOG_AUTH\fR (see \fBsyslog\fR(3C)). If the system crashed as a result of a
  43 panic, \fBsavecore\fR logs the panic string too.
  44 .SH OPTIONS
  45 .sp
  46 .LP
  47 The following options are supported:
  48 .sp
  49 .ne 2
  50 .na
  51 \fB\fB-d\fR\fR
  52 .ad
  53 .RS 15n
  54 Disregard dump header valid flag. Force \fBsavecore\fR to attempt to save a
  55 crash dump even if the header information stored on the dump device indicates
  56 the dump has already been saved.
  57 .RE
  58 
  59 .sp
  60 .ne 2
  61 .na
  62 \fB\fB-f\fR \fIdumpfile\fR\fR
  63 .ad
  64 .RS 15n
  65 Attempt to save a crash dump from the specified file instead of from the


  80 to retrieve the data and to write it out to a new set of crash dump files in
  81 the specified directory. Live system crash dumps can only be performed if you
  82 have configured your system to have a dedicated dump device using
  83 \fBdumpadm\fR(1M).
  84 .sp
  85 \fBsavecore\fR \fB-L\fR does not suspend the system, so the contents of memory
  86 continue to change while the dump is saved. This means that live crash dumps
  87 are not fully self-consistent.
  88 .RE
  89 
  90 .sp
  91 .ne 2
  92 .na
  93 \fB\fB-v\fR\fR
  94 .ad
  95 .RS 15n
  96 Verbose. Enables verbose error messages from \fBsavecore\fR.
  97 .RE
  98 
  99 .SH OPERANDS
 100 .sp
 101 .LP
 102 The following operands are supported:
 103 .sp
 104 .ne 2
 105 .na
 106 \fB\fIdirectory\fR\fR
 107 .ad
 108 .RS 13n
 109 Save the crash dump files to the specified directory. If \fIdirectory\fR is not
 110 specified, \fBsavecore\fR saves the crash dump files to the default
 111 \fBsavecore\fR \fIdirectory\fR, configured by \fBdumpadm\fR(1M).

 112 .RE
 113 
 114 .SH FILES
 115 .sp
 116 .ne 2
 117 .na
 118 \fB\fIdirectory\fR\fB/vmdump.\fR\fIn\fR\fR
 119 .ad
 120 .RS 29n
 121 
 122 .RE
 123 
 124 .sp
 125 .ne 2
 126 .na
 127 \fB\fIdirectory\fR\fB/vmcore.\fR\fIn\fR\fR
 128 .ad
 129 .RS 29n
 130 
 131 .RE
 132 
 133 .sp
 134 .ne 2
 135 .na
 136 \fB\fIdirectory\fR\fB/unix.\fR\fIn\fR\fR
 137 .ad
 138 .RS 29n
 139 
 140 .RE
 141 
 142 .sp
 143 .ne 2
 144 .na
 145 \fB\fIdirectory\fR\fB/bounds\fR\fR
 146 .ad
 147 .RS 29n
 148 
 149 .RE
 150 
 151 .sp
 152 .ne 2
 153 .na
 154 \fB\fIdirectory\fR\fB/minfree\fR\fR
 155 .ad
 156 .RS 29n
 157 
 158 .RE
 159 
 160 .sp
 161 .ne 2
 162 .na
 163 \fB\fB/var/crash/\&`uname \fR\fB-n\fR\fB\&`\fR\fR
 164 .ad
 165 .RS 29n
 166 default crash dump directory
 167 .RE
 168 
 169 .SH SEE ALSO
 170 .sp
 171 .LP
 172 \fBadb\fR(1), \fBmdb\fR(1), \fBsvcs\fR(1), \fBdd\fR(1M), \fBdumpadm\fR(1M),
 173 \fBsvcadm\fR(1M), \fBsyslog\fR(3C), \fBattributes\fR(5), \fBsmf\fR(5)
 174 .SH NOTES
 175 .sp
 176 .LP
 177 The system crash dump service is managed by the service management facility,
 178 \fBsmf\fR(5), under the service identifier:
 179 .sp
 180 .in +2
 181 .nf
 182 svc:/system/dumpadm:default
 183 .fi
 184 .in -2
 185 .sp
 186 
 187 .sp
 188 .LP
 189 Administrative actions on this service, such as enabling, disabling, or
 190 requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
 191 status can be queried using the \fBsvcs\fR(1) command.
 192 .sp
 193 .LP
 194 If the dump device is also being used as a swap device, you must run
 195 \fBsavecore\fR very soon after booting, before the swap space containing the
   1 '\" te
   2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
   3 .\" Copyright (c) 1983 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
   4 .\" Copyright 2017 Nexenta Systems, Inc.  All Rights Reserved.
   5 .TH SAVECORE 1M "Jan 08, 2017"
   6 .SH NAME
   7 savecore \- save a crash dump of the operating system
   8 .SH SYNOPSIS
   9 .LP
  10 .nf
  11 \fB/usr/bin/savecore\fR [\fB-Lvd\fR] [\fB-f\fR \fIdumpfile\fR] [\fIdirectory\fR]
  12 .fi
  13 
  14 .SH DESCRIPTION

  15 .LP
  16 The \fBsavecore\fR utility saves a crash dump of the kernel (assuming that one
  17 was made) and writes a reboot message in the shutdown log. By default, it is
  18 invoked by the \fBdumpadm\fR service each time the system boots.
  19 .sp
  20 .LP
  21 Depending on the \fBdumpadm\fR(1M) configuration \fBsavecore\fR saves either
  22 the compressed or uncompressed crash dump. The compressed crash dump is saved in
  23 the file \fIdirectory\fR/data/uuid\fB/vmdump.\fR\fIn\fR, where uuid is the OS
  24 instance UUID of the image that crashed.
  25 \fBsavecore\fR saves the uncompressed crash dump data in the file
  26 \fIdirectory\fR/data/uuid\fB/vmcore.\fR\fIn\fR and the kernel's namelist in
  27 \fIdirectory\fR/data/uuid\fB/unix.\fR\fIn.\fR The trailing \fIn\fR in the
  28 pathnames is replaced by a number which grows every time \fBsavecore\fR is run
  29 in that directory.
  30 .sp
  31 .LP
  32 Before writing out a crash dump, \fBsavecore\fR reads a number from the file
  33 \fIdirectory\fR\fB/minfree\fR. This is the minimum number of kilobytes that
  34 must remain free on the file system containing \fIdirectory\fR. If after saving
  35 the crash dump the file system containing \fIdirectory\fR would have less free
  36 space the number of kilobytes specified in \fBminfree\fR, the crash dump is not
  37 saved. if the \fBminfree\fR file does not exist, \fBsavecore\fR assumes a
  38 \fBminfree\fR value of 1 megabyte.
  39 .sp
  40 .LP
  41 The \fBsavecore\fR utility also logs a reboot message using facility
  42 \fBLOG_AUTH\fR (see \fBsyslog\fR(3C)). If the system crashed as a result of a
  43 panic, \fBsavecore\fR logs the panic string too.
  44 .SH OPTIONS

  45 .LP
  46 The following options are supported:
  47 .sp
  48 .ne 2
  49 .na
  50 \fB\fB-d\fR\fR
  51 .ad
  52 .RS 15n
  53 Disregard dump header valid flag. Force \fBsavecore\fR to attempt to save a
  54 crash dump even if the header information stored on the dump device indicates
  55 the dump has already been saved.
  56 .RE
  57 
  58 .sp
  59 .ne 2
  60 .na
  61 \fB\fB-f\fR \fIdumpfile\fR\fR
  62 .ad
  63 .RS 15n
  64 Attempt to save a crash dump from the specified file instead of from the


  79 to retrieve the data and to write it out to a new set of crash dump files in
  80 the specified directory. Live system crash dumps can only be performed if you
  81 have configured your system to have a dedicated dump device using
  82 \fBdumpadm\fR(1M).
  83 .sp
  84 \fBsavecore\fR \fB-L\fR does not suspend the system, so the contents of memory
  85 continue to change while the dump is saved. This means that live crash dumps
  86 are not fully self-consistent.
  87 .RE
  88 
  89 .sp
  90 .ne 2
  91 .na
  92 \fB\fB-v\fR\fR
  93 .ad
  94 .RS 15n
  95 Verbose. Enables verbose error messages from \fBsavecore\fR.
  96 .RE
  97 
  98 .SH OPERANDS

  99 .LP
 100 The following operands are supported:
 101 .sp
 102 .ne 2
 103 .na
 104 \fB\fIdirectory\fR\fR
 105 .ad
 106 .RS 13n
 107 Save the crash dump files to the specified directory. If \fIdirectory\fR is not
 108 specified, \fBsavecore\fR saves the crash dump to the default
 109 \fBsavecore\fR \fIdirectory\fR, configured by \fBdumpadm\fR(1M), and files are
 110 stored under distinct \fB\fIdirectory\fR/data/uuid folder.
 111 .RE
 112 
 113 .SH FILES

 114 .ne 2
 115 .na
 116 \fB\fIdirectory\fR/data/uuid\fB/vmdump.\fR\fIn\fR\fR
 117 .ad
 118 .RS 29n
 119 
 120 .RE
 121 
 122 .sp
 123 .ne 2
 124 .na
 125 \fB\fIdirectory\fR/data/uuid\fB/vmcore.\fR\fIn\fR\fR
 126 .ad
 127 .RS 29n
 128 
 129 .RE
 130 
 131 .sp
 132 .ne 2
 133 .na
 134 \fB\fIdirectory\fR/data/uuid\fB/unix.\fR\fIn\fR\fR
 135 .ad
 136 .RS 29n
 137 
 138 .RE
 139 
 140 .sp
 141 .ne 2
 142 .na
 143 \fB\fIdirectory\fR\fB/bounds\fR\fR
 144 .ad
 145 .RS 29n
 146 
 147 .RE
 148 
 149 .sp
 150 .ne 2
 151 .na
 152 \fB\fIdirectory\fR\fB/minfree\fR\fR
 153 .ad
 154 .RS 29n
 155 
 156 .RE
 157 
 158 .sp
 159 .ne 2
 160 .na
 161 \fB\fB/var/crash/\&`uname \fR\fB-n\fR\fB\&`\fR\fR
 162 .ad
 163 .RS 29n
 164 default crash dump directory
 165 .RE
 166 
 167 .SH SEE ALSO

 168 .LP
 169 \fBadb\fR(1), \fBmdb\fR(1), \fBsvcs\fR(1), \fBdd\fR(1M), \fBdumpadm\fR(1M),
 170 \fBsvcadm\fR(1M), \fBsyslog\fR(3C), \fBattributes\fR(5), \fBsmf\fR(5)
 171 .SH NOTES

 172 .LP
 173 The system crash dump service is managed by the service management facility,
 174 \fBsmf\fR(5), under the service identifier:
 175 .sp
 176 .in +2
 177 .nf
 178 svc:/system/dumpadm:default
 179 .fi
 180 .in -2
 181 .sp
 182 
 183 .sp
 184 .LP
 185 Administrative actions on this service, such as enabling, disabling, or
 186 requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
 187 status can be queried using the \fBsvcs\fR(1) command.
 188 .sp
 189 .LP
 190 If the dump device is also being used as a swap device, you must run
 191 \fBsavecore\fR very soon after booting, before the swap space containing the