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