1dumpadm(1M) System Administration Commands dumpadm(1M)
2
3
4
6 dumpadm - configure operating system crash dump
7
9 /usr/sbin/dumpadm [-nuy] [-c content-type] [-d dump-device]
10 [-m mink | minm | min%] [-s savecore-dir]
11 [-r root-dir]
12
13
15 The dumpadm program is an administrative command that manages the con‐
16 figuration of the operating system crash dump facility. A crash dump is
17 a disk copy of the physical memory of the computer at the time of a
18 fatal system error. When a fatal operating system error occurs, a mes‐
19 sage describing the error is printed to the console. The operating sys‐
20 tem then generates a crash dump by writing the contents of physical
21 memory to a predetermined dump device, which is typically a local disk
22 partition. The dump device can be configured by way of dumpadm. Once
23 the crash dump has been written to the dump device, the system will
24 reboot.
25
26
27 Fatal operating system errors can be caused by bugs in the operating
28 system, its associated device drivers and loadable modules, or by
29 faulty hardware. Whatever the cause, the crash dump itself provides
30 invaluable information to your support engineer to aid in diagnosing
31 the problem. As such, it is vital that the crash dump be retrieved and
32 given to your support provider. Following an operating system crash,
33 the savecore(1M) utility is executed automatically during boot to
34 retrieve the crash dump from the dump device, and write it to a pair of
35 files in your file system named unix.X and vmcore.X, where X is an
36 integer identifying the dump. Together, these data files form the saved
37 crash dump. The directory in which the crash dump is saved on reboot
38 can also be configured using dumpadm.
39
40
41 For systems with a UFS root file system, the default dump device is
42 configured to be an appropriate swap partition. Swap partitions are
43 disk partitions reserved as virtual memory backing store for the oper‐
44 ating system. Thus, no permanent information resides in swap to be
45 overwritten by the dump. See swap(1M). For systems with a ZFS root file
46 system, dedicated ZFS volumes are used for swap and dump areas. For
47 further information about setting up a dump area with ZFS, see the ZFS
48 Administration Guide. To view the current dump configuration, use the
49 dumpadm command with no arguments:
50
51 example# dumpadm
52
53 Dump content: kernel pages
54 Dump device: /dev/dsk/c0t0d0s1 (swap)
55 Savecore directory: /var/crash/saturn
56 Savecore enabled: yes
57
58
59
60
61 When no options are specified, dumpadm prints the current crash dump
62 configuration. The example shows the set of default values: the dump
63 content is set to kernel memory pages only, the dump device is a swap
64 disk partition, the directory for savecore files is set to
65 /var/crash/hostname, and savecore is set to run automatically on
66 reboot.
67
68
69 When one or more options are specified, dumpadm verifies that your
70 changes are valid, and if so, reconfigures the crash dump parameters
71 and displays the resulting configuration. You must be root to view or
72 change dump parameters.
73
75 The following options are supported:
76
77 -c content-type
78
79 Modify the dump configuration so that the crash dump consists of
80 the specified dump content. The content should be one of the fol‐
81 lowing:
82
83 kernel
84
85 Kernel memory pages only.
86
87
88 all
89
90 All memory pages.
91
92
93 curproc
94
95 Kernel memory pages, and the memory pages of the process whose
96 thread was currently executing on the CPU on which the crash
97 dump was initiated. If the thread executing on that CPU is a
98 kernel thread not associated with any user process, only kernel
99 pages will be dumped.
100
101
102
103 -d dump-device
104
105 Modify the dump configuration to use the specified dump device. The
106 dump device may one of the following:
107
108 dump-device
109
110 A specific dump device specified as an absolute pathname, such
111 as /dev/dsk/cNtNdNsN when the system is running a UFS root file
112 system. Or, specify a ZFS volume, such as
113 /dev/zvol/dsk/rpool/dump, when the system is running a ZFS root
114 file system.
115
116
117 swap
118
119 If the special token swap is specified as the dump device,
120 dumpadm examines the active swap entries and selects the most
121 appropriate entry to configure as the dump device. See
122 swap(1M). Refer to the NOTES below for details of the algo‐
123 rithm used to select an appropriate swap entry. When the sys‐
124 tem is first installed with a UFS root file system, dumpadm
125 uses the value for swap to determine the initial dump device
126 setting. A given ZFS volume cannot be configured for both the
127 swap area and the dump device.
128
129
130
131 -m mink | minm | min%
132
133 Create a minfree file in the current savecore directory indicating
134 that savecore should maintain at least the specified amount of free
135 space in the file system where the savecore directory is located.
136 The min argument can be one of the following:
137
138 k
139
140 A positive integer suffixed with the unit k specifying kilo‐
141 bytes.
142
143
144 m
145
146 A positive integer suffixed with the unit m specifying
147 megabytes.
148
149
150 %
151
152 A % symbol, indicating that the minfree value should be com‐
153 puted as the specified percentage of the total current size of
154 the file system containing the savecore directory.
155
156 The savecore command will consult the minfree file, if present,
157 prior to writing the dump files. If the size of these files would
158 decrease the amount of free disk space below the minfree threshold,
159 no dump files are written and an error message is logged. The
160 administrator should immediately clean up the savecore directory to
161 provide adequate free space, and re-execute the savecore command
162 manually. The administrator can also specify an alternate directory
163 on the savecore command-line.
164
165
166 -n
167
168 Modify the dump configuration to not run savecore automatically on
169 reboot. This is not the recommended system configuration; if the
170 dump device is a swap partition, the dump data will be overwritten
171 as the system begins to swap. If savecore is not executed shortly
172 after boot, crash dump retrieval may not be possible.
173
174
175 -r root-dir
176
177 Specify an alternate root directory relative to which dumpadm
178 should create files. If no -r argument is specified, the default
179 root directory / is used.
180
181
182 -s savecore-dir
183
184 Modify the dump configuration to use the specified directory to
185 save files written by savecore. The directory should be an absolute
186 path and exist on the system. If upon reboot the directory does not
187 exist, it will be created prior to the execution of savecore. See
188 the NOTES section below for a discussion of security issues relat‐
189 ing to access to the savecore directory. The default savecore
190 directory is /var/crash/hostname where hostname is the output of
191 the -n option to the uname(1) command.
192
193
194 -u
195
196 Forcibly update the kernel dump configuration based on the contents
197 of /etc/dumpadm.conf. Normally this option is used only on reboot
198 when starting svc:/system/dumpadm:default, when the dumpadm set‐
199 tings from the previous boot must be restored. Your dump configura‐
200 tion is saved in the configuration file for this purpose. If the
201 configuration file is missing or contains invalid values for any
202 dump properties, the default values are substituted. Following the
203 update, the configuration file is resynchronized with the kernel
204 dump configuration.
205
206
207 -y
208
209 Modify the dump configuration to automatically run savecore on
210 reboot. This is the default for this dump setting.
211
212
214 Example 1 Reconfiguring The Dump Device To A Dedicated Dump Device:
215
216
217 The following command reconfigures the dump device to a dedicated dump
218 device:
219
220
221 example# dumpadm -d /dev/dsk/c0t2d0s2
222
223 Dump content: kernel pages
224 Dump device: /dev/dsk/c0t2d0s2 (dedicated)
225 Savecore directory: /var/crash/saturn
226 Savecore enabled: yes
227
228
229
231 The following exit values are returned:
232
233 0
234
235 Dump configuration is valid and the specified modifications, if
236 any, were made successfully.
237
238
239 1
240
241 A fatal error occurred in either obtaining or modifying the dump
242 configuration.
243
244
245 2
246
247 Invalid command line options were specified.
248
249
251 /dev/dump
252
253 Dump device.
254
255
256 /etc/dumpadm.conf
257
258 Contains configuration parameters for dumpadm. Modifiable only
259 through that command.
260
261
262 savecore-directory/minfree
263
264 Contains minimum amount of free space for savecore-directory. See
265 savecore(1M).
266
267
269 See attributes(5) for descriptions of the following attributes:
270
271
272
273
274 ┌─────────────────────────────┬─────────────────────────────┐
275 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
276 ├─────────────────────────────┼─────────────────────────────┤
277 │Availability │SUNWcsr │
278 └─────────────────────────────┴─────────────────────────────┘
279
281 svcs(1), uname(1), savecore(1M), svcadm(1M), swap(1M), attributes(5),
282 smf(5)
283
285 The system crash dump service is managed by the service management
286 facility, smf(5), under the service identifier:
287
288 svc:/system/dumpadm:default
289
290
291
292
293 Administrative actions on this service, such as enabling, disabling, or
294 requesting restart, can be performed using svcadm(1M). The service's
295 status can be queried using the svcs(1) command.
296
297 Dump Device Selection
298 When the special swap token is specified as the argument to dumpadm -d
299 the utility will attempt to configure the most appropriate swap device
300 as the dump device. dumpadm configures the largest swap block device as
301 the dump device; if no block devices are available for swap, the
302 largest swap entry is configured as the dump device. If no swap entries
303 are present, or none can be configured as the dump device, a warning
304 message will be displayed. While local and remote swap files can be
305 configured as the dump device, this is not recommended.
306
307 Dump Device/Swap Device Interaction (UFS File Systems Only)
308 In the event that the dump device is also a swap device, and the swap
309 device is deleted by the administrator using the swap -d command, the
310 swap command will automatically invoke dumpadm -d swap in order to
311 attempt to configure another appropriate swap device as the dump
312 device. If no swap devices remain or none can be configured as the dump
313 device, the crash dump will be disabled and a warning message will be
314 displayed. Similarly, if the crash dump is disabled and the administra‐
315 tor adds a new swap device using the swap -a command, dumpadm -d swap
316 will be invoked to re-enable the crash dump using the new swap device.
317
318
319 Once dumpadm -d swap has been issued, the new dump device is stored in
320 the configuration file for subsequent reboots. If a larger or more
321 appropriate swap device is added by the administrator, the dump device
322 is not changed; the administrator must re-execute dumpadm -d swap to
323 reselect the most appropriate device fom the new list of swap devices.
324
325 Minimum Free Space
326 If the dumpadm -m option is used to create a minfree file based on a
327 percentage of the total size of the file system containing the savecore
328 directory, this value is not automatically recomputed if the file sys‐
329 tem subsequently changes size. In this case, the administrator must
330 re-execute dumpadm -m to recompute the minfree value. If no such file
331 exists in the savecore directory, savecore will default to a free space
332 threshold of one megabyte. If no free space threshold is desired, a
333 minfree file containing size 0 can be created.
334
335 Security Issues
336 If, upon reboot, the specified savecore directory is not present, it
337 will be created prior to the execution of savecore with permissions
338 0700 (read, write, execute by owner only) and owner root. It is recom‐
339 mended that alternate savecore directories also be created with similar
340 permissions, as the operating system crash dump files themselves may
341 contain secure information.
342
343
344
345SunOS 5.11 10 Apr 2008 dumpadm(1M)