3557 dumpvp_size is not updated correctly when a dump zvol's size is changed
[unleashed.git] / usr / src / man / man1m / dumpadm.1m
blobd46160d7c3bb549bb1d4fe33a3371b6c6e5def3a
1 '\" te
2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
3 .\" Copyright 2013 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 1M "Feb 15, 2013"
9 .SH NAME
10 dumpadm \- configure operating system crash dump
11 .SH SYNOPSIS
12 .LP
13 .nf
14 \fB/usr/sbin/dumpadm\fR [\fB-nuy\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]
17 .fi
19 .SH DESCRIPTION
20 .sp
21 .LP
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.
31 .sp
32 .LP
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(1M) 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.
42 .sp
43 .LP
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(1M) 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.
51 .sp
52 .LP
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(1M). 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:
61 .sp
62 .in +2
63 .nf
64 example# \fBdumpadm\fR
66       Dump content: kernel pages
67        Dump device: /dev/dsk/c0t0d0s1 (swap)
68 Savecore directory: /var/crash/saturn
69   Savecore enabled: yes
70    Save compressed: on
71 .fi
72 .in -2
73 .sp
75 .sp
76 .LP
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.
83 .sp
84 .LP
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
88 dump parameters.
89 .SH OPTIONS
90 .sp
91 .LP
92 The following options are supported:
93 .sp
94 .ne 2
95 .na
96 \fB\fB-c\fR \fIcontent-type\fR\fR
97 .ad
98 .sp .6
99 .RS 4n
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:
103 .ne 2
105 \fB\fBkernel\fR\fR
107 .sp .6
108 .RS 4n
109 Kernel memory pages only.
113 .ne 2
115 \fB\fBall\fR\fR
117 .sp .6
118 .RS 4n
119 All memory pages.
123 .ne 2
125 \fB\fBcurproc\fR\fR
127 .sp .6
128 .RS 4n
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.
138 .ne 2
140 \fB\fB-d\fR \fIdump-device\fR\fR
142 .sp .6
143 .RS 4n
144 Modify the dump configuration to use the specified dump device. The dump device
145 may be one of the following:
147 .ne 2
149 \fB\fIdump-device\fR\fR
151 .sp .6
152 .RS 4n
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.
160 .ne 2
162 \fB\fBswap\fR\fR
164 .sp .6
165 .RS 4n
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(1M). 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
173 device.
177 .ne 2
179 \fB\fBnone\fR\fR
181 .sp .6
182 .RS 4n
183 If the special token \fBnone\fR is specified, the active dump device is removed
184 and crash dumps are disabled.
190 .ne 2
192 \fB\fB-m\fR \fImin\fR\fBk\fR | \fImin\fR\fBm\fR | \fImin\fR\fB%\fR\fR
194 .sp .6
195 .RS 4n
196 Create a \fBminfree\fR file in the current savecore directory indicating that
197 \fBsavecore\fR should maintain at least the specified amount of free space in
198 the file system where the savecore directory is located. The \fBmin\fR argument
199 can be one of the following:
201 .ne 2
203 \fB\fBk\fR\fR
205 .sp .6
206 .RS 4n
207 A positive integer suffixed with the unit \fBk\fR specifying kilobytes.
211 .ne 2
213 \fB\fBm\fR\fR
215 .sp .6
216 .RS 4n
217 A positive integer suffixed with the unit \fBm\fR specifying megabytes.
221 .ne 2
223 \fB\fB%\fR\fR
225 .sp .6
226 .RS 4n
227 A % symbol, indicating that the \fBminfree\fR value should be computed as the
228 specified percentage of the total current size of the file system containing
229 the savecore directory.
232 The \fBsavecore\fR command will consult the \fBminfree\fR file, if present,
233 prior to writing the dump files. If the size of these files would decrease the
234 amount of free disk space below the \fBminfree\fR threshold, no dump files are
235 written and an error message is logged. The administrator should immediately
236 clean up the savecore directory to provide adequate free space, and re-execute
237 the \fBsavecore\fR command manually. The administrator can also specify an
238 alternate directory on the \fBsavecore\fR command-line.
242 .ne 2
244 \fB\fB-n\fR\fR
246 .sp .6
247 .RS 4n
248 Modify the dump configuration to not run \fBsavecore\fR automatically on
249 reboot. This is not the recommended system configuration; if the dump device is
250 a swap partition, the dump data will be overwritten as the system begins to
251 swap. If \fBsavecore\fR is not executed shortly after boot, crash dump
252 retrieval may not be possible.
256 .ne 2
258 \fB\fB-r\fR \fIroot-dir\fR\fR
260 .sp .6
261 .RS 4n
262 Specify an alternate root directory relative to which \fBdumpadm\fR should
263 create files. If no \fB-r\fR argument is specified, the default root directory
264 \fB/\fR is used.
268 .ne 2
270 \fB\fB-s\fR \fIsavecore-dir\fR\fR
272 .sp .6
273 .RS 4n
274 Modify the dump configuration to use the specified directory to save files
275 written by \fBsavecore\fR. The directory should be an absolute path and exist
276 on the system. If upon reboot the directory does not exist, it will be created
277 prior to the execution of \fBsavecore\fR. See the \fBNOTES\fR section below for
278 a discussion of security issues relating to access to the savecore directory.
279 The default savecore directory is \fB/var/crash/\fIhostname\fR\fR where
280 \fIhostname\fR is the output of the \fB-n\fR option to the \fBuname\fR(1)
281 command.
285 .ne 2
287 \fB\fB-u\fR\fR
289 .sp .6
290 .RS 4n
291 Forcibly update the kernel dump configuration based on the contents of
292 \fB/etc/dumpadm.conf\fR. Normally this option is used only on reboot when
293 starting \fBsvc:/system/dumpadm:default\fR, when the \fBdumpadm\fR settings
294 from the previous boot must be restored. Your dump configuration is saved in
295 the configuration file for this purpose. If the configuration file is missing
296 or contains invalid values for any dump properties, the default values are
297 substituted. Following the update, the configuration file is resynchronized
298 with the kernel dump configuration.
302 .ne 2
304 \fB\fB-y\fR\fR
306 .sp .6
307 .RS 4n
308 Modify the dump configuration to automatically run \fBsavecore\fR on reboot.
309 This is the default for this dump setting.
313 .ne 2
315 \fB\fB-z on | off\fR\fR
317 .sp .6
318 .RS 4n
319 Turns crash dump compression \fBon\fR or \fBoff\fR.
322 .SH EXAMPLES
324 \fBExample 1 \fRReconfiguring The Dump Device To A Dedicated Dump Device:
327 The following command reconfigures the dump device to a dedicated dump device:
330 .in +2
332 example# dumpadm -d /dev/dsk/c0t2d0s2
334            Dump content: kernel pages
335             Dump device: /dev/dsk/c0t2d0s2 (dedicated)
336      Savecore directory: /var/crash/saturn
337        Savecore enabled: yes
338         Save compressed: on
340 .in -2
343 .SH EXIT STATUS
346 The following exit values are returned:
348 .ne 2
350 \fB\fB0\fR\fR
352 .sp .6
353 .RS 4n
354 Dump configuration is valid and the specified modifications, if any, were made
355 successfully.
359 .ne 2
361 \fB\fB1\fR\fR
363 .sp .6
364 .RS 4n
365 A fatal error occurred in either obtaining or modifying the dump configuration.
369 .ne 2
371 \fB\fB2\fR\fR
373 .sp .6
374 .RS 4n
375 Invalid command line options were specified.
378 .SH FILES
380 .ne 2
382 \fB\fB/dev/dump\fR\fR
384 .sp .6
385 .RS 4n
386 Dump device.
390 .ne 2
392 \fB\fB/etc/dumpadm.conf\fR\fR
394 .sp .6
395 .RS 4n
396 Contains configuration parameters for \fBdumpadm\fR. Modifiable only through
397 that command.
401 .ne 2
403 \fB\fIsavecore-directory\fR\fB/minfree\fR\fR
405 .sp .6
406 .RS 4n
407 Contains minimum amount of free space for \fIsavecore-directory\fR. See
408 \fBsavecore\fR(1M).
411 .SH SEE ALSO
414 \fBsvcs\fR(1), \fBuname\fR(1), \fBsavecore\fR(1M), \fBsvcadm\fR(1M),
415 \fBswap\fR(1M), \fBattributes\fR(5), \fBsmf\fR(5)
416 .SH NOTES
419 The system crash dump service is managed by the service management facility,
420 \fBsmf\fR(5), under the service identifier:
422 .in +2
424 svc:/system/dumpadm:default
426 .in -2
431 Administrative actions on this service, such as enabling, disabling, or
432 requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
433 status can be queried using the \fBsvcs\fR(1) command.
434 .SS "Dump Device Selection"
437 When the special \fBswap\fR token is specified as the argument to \fBdumpadm\fR
438 \fB-d\fR the utility will attempt to configure the most appropriate swap device
439 as the dump device. \fBdumpadm\fR configures the largest swap block device as
440 the dump device; if no block devices are available for swap, the largest swap
441 entry is configured as the dump device. If no swap entries are present, or none
442 can be configured as the dump device, a warning message will be displayed.
443 While local and remote swap files can be configured as the dump device, this is
444 not recommended.
445 .SS "Dump Device/Swap Device Interaction (UFS File Systems Only)"
448 In the event that the dump device is also a swap device, and the swap device is
449 deleted by the administrator using the \fBswap\fR \fB-d\fR command, the
450 \fBswap\fR command will automatically invoke \fBdumpadm\fR \fB-d\fR \fBswap\fR
451 in order to attempt to configure another appropriate swap device as the dump
452 device. If no swap devices remain or none can be configured as the dump device,
453 the crash dump will be disabled and a warning message will be displayed.
454 Similarly, if the crash dump is disabled and the administrator adds a new swap
455 device using the \fBswap\fR \fB-a\fR command, \fBdumpadm\fR \fB-d\fR \fBswap\fR
456 will be invoked to re-enable the crash dump using the new swap device.
459 Once \fBdumpadm\fR \fB-d\fR \fBswap\fR has been issued, the new dump device is
460 stored in the configuration file for subsequent reboots. If a larger or more
461 appropriate swap device is added by the administrator, the dump device is not
462 changed; the administrator must re-execute \fBdumpadm\fR \fB-d\fR \fBswap\fR to
463 reselect the most appropriate device fom the new list of swap devices.
464 .SS "Minimum Free Space"
467 If the \fBdumpadm\fR \fB-m\fR option is used to create a \fBminfree\fR file
468 based on a percentage of the total size of the file system containing the
469 savecore directory, this value is not automatically recomputed if the file
470 system subsequently changes size.  In this case, the administrator must
471 re-execute \fBdumpadm\fR \fB-m\fR to recompute the \fBminfree\fR value. If no
472 such file exists in the savecore directory, \fBsavecore\fR will default to a
473 free space threshold of one megabyte. If no free space threshold is desired, a
474 minfree file containing size 0 can be created.
475 .SS "Security Issues"
478 If, upon reboot, the specified savecore directory is not present, it will be
479 created prior to the execution of \fBsavecore\fR with permissions 0700 (read,
480 write, execute by owner only) and owner \fBroot\fR. It is recommended that
481 alternate savecore directories also be created with similar permissions, as the
482 operating system crash dump files themselves may contain secure information.