2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
3 .\" Copyright 2015 Nexenta Systems, Inc. All Rights Reserved.
4 .\" Copyright (c) 2013 by Delphix. All rights reserved.
5 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
6 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
7 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
8 .TH DUMPADM 8 "Apr 09, 2015"
10 dumpadm \- configure operating system crash dump
14 \fB/usr/sbin/dumpadm\fR [\fB-enuy\fR] [\fB-c\fR \fIcontent-type\fR] [\fB-d\fR \fIdump-device\fR]
15 [\fB-m\fR \fImin\fRk | \fImin\fRm | \fImin\fR%] [\fB-s\fR \fIsavecore-dir\fR]
16 [\fB-r\fR \fIroot-dir\fR] [\fB-z\fR on | off]
22 The \fBdumpadm\fR program is an administrative command that manages the
23 configuration of the operating system crash dump facility. A crash dump is a
24 disk copy of the physical memory of the computer at the time of a fatal system
25 error. When a fatal operating system error occurs, a message describing the
26 error is printed to the console. The operating system then generates a crash
27 dump by writing the contents of physical memory to a predetermined dump device,
28 which is typically a local disk partition. The dump device can be configured by
29 way of \fBdumpadm\fR. Once the crash dump has been written to the dump device,
30 the system will reboot.
33 Fatal operating system errors can be caused by bugs in the operating system,
34 its associated device drivers and loadable modules, or by faulty hardware.
35 Whatever the cause, the crash dump itself provides invaluable information to
36 your support engineer to aid in diagnosing the problem. As such, it is vital
37 that the crash dump be retrieved and given to your support provider. Following
38 an operating system crash, the \fBsavecore\fR(8) utility is executed
39 automatically during boot to retrieve the crash dump from the dump device, and
40 write it to the file system. The directory in which the crash
41 dump is saved on reboot can also be configured using \fBdumpadm\fR.
44 When the operating system takes a crash dump the default behavior is to
45 compress the crash dump. This behavior is controlled by the \fB-z\fR option.
46 When compression is turned on, the \fBsavecore\fR(8) utility writes one file
47 to the file system named \fIvmdump.X\fR. If compression is disabled, it instead
48 writes two files named \fIunix.X\fR and \fIvmcore.X\fR. In the uncompressed
49 case, both data files form the \fIsaved crash dump\fR. In both cases X is an
50 integer identifying the dump.
53 For systems with a UFS root file system, the default dump device is configured
54 to be an appropriate swap partition. Swap partitions are disk partitions
55 reserved as virtual memory backing store for the operating system. Thus, no
56 permanent information resides in swap to be overwritten by the dump. See
57 \fBswap\fR(8). For systems with a ZFS root file system, dedicated ZFS volumes
58 are used for swap and dump areas. For further information about setting up a
59 dump area with ZFS, see the \fIZFS Administration Guide\fR. To view the
60 current dump configuration, use the \fBdumpadm\fR command with no arguments:
64 example# \fBdumpadm\fR
66 Dump content: kernel pages
67 Dump device: /dev/dsk/c0t0d0s1 (swap)
68 Savecore directory: /var/crash/saturn
77 When no options are specified, \fBdumpadm\fR prints the current crash dump
78 configuration. The example shows the set of default values: the dump content is
79 set to kernel memory pages only, the dump device is a swap disk partition, the
80 directory for \fBsavecore\fR files is set to
81 \fB/var/crash/\fR\fIhostname\fR\fB,\fR \fBsavecore\fR is set to run
82 automatically on reboot, and compression is turned on.
85 When one or more options are specified, \fBdumpadm\fR verifies that your
86 changes are valid, and if so, reconfigures the crash dump parameters and
87 displays the resulting configuration. You must be \fBroot\fR to view or change
92 The following options are supported:
96 \fB\fB-c\fR \fIcontent-type\fR\fR
100 Modify the dump configuration so that the crash dump consists of the specified
101 dump content. The content should be one of the following:
109 Kernel memory pages only.
129 Kernel memory pages, and the memory pages of the process whose thread was
130 currently executing on the CPU on which the crash dump was initiated. If the
131 thread executing on that CPU is a kernel thread not associated with any user
132 process, only kernel pages will be dumped.
140 \fB\fB-d\fR \fIdump-device\fR\fR
144 Modify the dump configuration to use the specified dump device. The dump device
145 may be one of the following:
149 \fB\fIdump-device\fR\fR
153 A specific dump device specified as an absolute pathname, such as
154 \fB/dev/dsk/\fR\fIcNtNdNsN\fR when the system is running a UFS root file
155 system. Or, specify a ZFS volume, such as \fB/dev/zvol/dsk/rpool/dump\fR, when
156 the system is running a ZFS root file system.
166 If the special token \fBswap\fR is specified as the dump device, \fBdumpadm\fR
167 examines the active swap entries and selects the most appropriate entry to
168 configure as the dump device. See \fBswap\fR(8). Refer to the \fBNOTES\fR
169 below for details of the algorithm used to select an appropriate swap entry.
170 When the system is first installed with a UFS root file system, \fBdumpadm\fR
171 uses the value for \fBswap\fR to determine the initial dump device setting. A
172 given ZFS volume cannot be configured for both the swap area and the dump
183 If the special token \fBnone\fR is specified, the active dump device is removed
184 and crash dumps are disabled.
196 Estimates the size of the dump for the current running system.
202 \fB\fB-m\fR \fImin\fR\fBk\fR | \fImin\fR\fBm\fR | \fImin\fR\fB%\fR\fR
206 Create a \fBminfree\fR file in the current savecore directory indicating that
207 \fBsavecore\fR should maintain at least the specified amount of free space in
208 the file system where the savecore directory is located. The \fBmin\fR argument
209 can be one of the following:
217 A positive integer suffixed with the unit \fBk\fR specifying kilobytes.
227 A positive integer suffixed with the unit \fBm\fR specifying megabytes.
237 A % symbol, indicating that the \fBminfree\fR value should be computed as the
238 specified percentage of the total current size of the file system containing
239 the savecore directory.
242 The \fBsavecore\fR command will consult the \fBminfree\fR file, if present,
243 prior to writing the dump files. If the size of these files would decrease the
244 amount of free disk space below the \fBminfree\fR threshold, no dump files are
245 written and an error message is logged. The administrator should immediately
246 clean up the savecore directory to provide adequate free space, and re-execute
247 the \fBsavecore\fR command manually. The administrator can also specify an
248 alternate directory on the \fBsavecore\fR command-line.
258 Modify the dump configuration to not run \fBsavecore\fR automatically on
259 reboot. This is not the recommended system configuration; if the dump device is
260 a swap partition, the dump data will be overwritten as the system begins to
261 swap. If \fBsavecore\fR is not executed shortly after boot, crash dump
262 retrieval may not be possible.
268 \fB\fB-r\fR \fIroot-dir\fR\fR
272 Specify an alternate root directory relative to which \fBdumpadm\fR should
273 create files. If no \fB-r\fR argument is specified, the default root directory
280 \fB\fB-s\fR \fIsavecore-dir\fR\fR
284 Modify the dump configuration to use the specified directory to save files
285 written by \fBsavecore\fR. The directory should be an absolute path and exist
286 on the system. If upon reboot the directory does not exist, it will be created
287 prior to the execution of \fBsavecore\fR. See the \fBNOTES\fR section below for
288 a discussion of security issues relating to access to the savecore directory.
289 The default savecore directory is \fB/var/crash/\fIhostname\fR\fR where
290 \fIhostname\fR is the output of the \fB-n\fR option to the \fBuname\fR(1)
301 Forcibly update the kernel dump configuration based on the contents of
302 \fB/etc/dumpadm.conf\fR. Normally this option is used only on reboot when
303 starting \fBsvc:/system/dumpadm:default\fR, when the \fBdumpadm\fR settings
304 from the previous boot must be restored. Your dump configuration is saved in
305 the configuration file for this purpose. If the configuration file is missing
306 or contains invalid values for any dump properties, the default values are
307 substituted. Following the update, the configuration file is resynchronized
308 with the kernel dump configuration.
318 Modify the dump configuration to automatically run \fBsavecore\fR on reboot.
319 This is the default for this dump setting.
325 \fB\fB-z on | off\fR\fR
329 Turns crash dump compression \fBon\fR or \fBoff\fR.
334 \fBExample 1 \fRReconfiguring The Dump Device To A Dedicated Dump Device:
337 The following command reconfigures the dump device to a dedicated dump device:
342 example# dumpadm -d /dev/dsk/c0t2d0s2
344 Dump content: kernel pages
345 Dump device: /dev/dsk/c0t2d0s2 (dedicated)
346 Savecore directory: /var/crash/saturn
347 Savecore enabled: yes
356 The following exit values are returned:
364 Dump configuration is valid and the specified modifications, if any, were made
375 A fatal error occurred in either obtaining or modifying the dump configuration.
385 Invalid command line options were specified.
392 \fB\fB/dev/dump\fR\fR
402 \fB\fB/etc/dumpadm.conf\fR\fR
406 Contains configuration parameters for \fBdumpadm\fR. Modifiable only through
413 \fB\fIsavecore-directory\fR\fB/minfree\fR\fR
417 Contains minimum amount of free space for \fIsavecore-directory\fR. See
424 \fBsvcs\fR(1), \fBuname\fR(1), \fBsavecore\fR(8), \fBsvcadm\fR(8),
425 \fBswap\fR(8), \fBattributes\fR(5), \fBsmf\fR(5)
429 The system crash dump service is managed by the service management facility,
430 \fBsmf\fR(5), under the service identifier:
434 svc:/system/dumpadm:default
441 Administrative actions on this service, such as enabling, disabling, or
442 requesting restart, can be performed using \fBsvcadm\fR(8). The service's
443 status can be queried using the \fBsvcs\fR(1) command.
444 .SS "Dump Device Selection"
447 When the special \fBswap\fR token is specified as the argument to \fBdumpadm\fR
448 \fB-d\fR the utility will attempt to configure the most appropriate swap device
449 as the dump device. \fBdumpadm\fR configures the largest swap block device as
450 the dump device; if no block devices are available for swap, the largest swap
451 entry is configured as the dump device. If no swap entries are present, or none
452 can be configured as the dump device, a warning message will be displayed.
453 While local and remote swap files can be configured as the dump device, this is
455 .SS "Dump Device/Swap Device Interaction (UFS File Systems Only)"
458 In the event that the dump device is also a swap device, and the swap device is
459 deleted by the administrator using the \fBswap\fR \fB-d\fR command, the
460 \fBswap\fR command will automatically invoke \fBdumpadm\fR \fB-d\fR \fBswap\fR
461 in order to attempt to configure another appropriate swap device as the dump
462 device. If no swap devices remain or none can be configured as the dump device,
463 the crash dump will be disabled and a warning message will be displayed.
464 Similarly, if the crash dump is disabled and the administrator adds a new swap
465 device using the \fBswap\fR \fB-a\fR command, \fBdumpadm\fR \fB-d\fR \fBswap\fR
466 will be invoked to re-enable the crash dump using the new swap device.
469 Once \fBdumpadm\fR \fB-d\fR \fBswap\fR has been issued, the new dump device is
470 stored in the configuration file for subsequent reboots. If a larger or more
471 appropriate swap device is added by the administrator, the dump device is not
472 changed; the administrator must re-execute \fBdumpadm\fR \fB-d\fR \fBswap\fR to
473 reselect the most appropriate device fom the new list of swap devices.
474 .SS "Minimum Free Space"
477 If the \fBdumpadm\fR \fB-m\fR option is used to create a \fBminfree\fR file
478 based on a percentage of the total size of the file system containing the
479 savecore directory, this value is not automatically recomputed if the file
480 system subsequently changes size. In this case, the administrator must
481 re-execute \fBdumpadm\fR \fB-m\fR to recompute the \fBminfree\fR value. If no
482 such file exists in the savecore directory, \fBsavecore\fR will default to a
483 free space threshold of one megabyte. If no free space threshold is desired, a
484 minfree file containing size 0 can be created.
485 .SS "Security Issues"
488 If, upon reboot, the specified savecore directory is not present, it will be
489 created prior to the execution of \fBsavecore\fR with permissions 0700 (read,
490 write, execute by owner only) and owner \fBroot\fR. It is recommended that
491 alternate savecore directories also be created with similar permissions, as the
492 operating system crash dump files themselves may contain secure information.