1MAKEDUMPFILE(8)       Linux System Administrator's Manual      MAKEDUMPFILE(8)
2
3
4

NAME

6       makedumpfile - make a small dumpfile of kdump
7

SYNOPSIS

9       makedumpfile    [OPTION] [-x VMLINUX|-i VMCOREINFO] VMCORE DUMPFILE
10       makedumpfile -F [OPTION] [-x VMLINUX|-i VMCOREINFO] VMCORE
11       makedumpfile -R DUMPFILE
12       makedumpfile  --split  [OPTION] [-x VMLINUX|-i VMCOREINFO] VMCORE DUMP‐
13       FILE1 DUMPFILE2 [DUMPFILE3 ..]
14       makedumpfile --reassemble DUMPFILE1 DUMPFILE2 [DUMPFILE3 ..] DUMPFILE
15       makedumpfile -g VMCOREINFO -x VMLINUX
16       makedumpfile  -E  [--xen-syms   XEN-SYMS|--xen-vmcoreinfo   VMCOREINFO]
17       VMCORE DUMPFILE
18       makedumpfile --dump-dmesg [-x VMLINUX|-i VMCOREINFO] VMCORE LOGFILE
19       makedumpfile -h
20       makedumpfile -v
21

DESCRIPTION

23       With kdump, the memory image of the first kernel (called "panicked ker‐
24       nel") can be taken as /proc/vmcore  while  the  second  kernel  (called
25       "kdump  kernel"  or  "capture kernel") is running. This document repre‐
26       sents /proc/vmcore as VMCORE. makedumpfile makes a  small  DUMPFILE  by
27       compressing  dump  data or by excluding unnecessary pages for analysis,
28       or both. makedumpfile needs the first kernel's  debug  information,  so
29       that  it  can  distinguish unnecessary pages by analyzing how the first
30       kernel uses the memory.  The information can be taken from  VMLINUX  or
31       VMCOREINFO.
32
33       makedumpfile  can  exclude  the  following types of pages while copying
34       VMCORE to DUMPFILE, and a user can choose which type of pages  will  be
35       excluded.
36       - Pages filled with zero
37       - Cache pages
38       - User process data pages
39       - Free pages
40
41       makedumpfile  provides  two  DUMPFILE  formats  (the ELF format and the
42       kdump-compressed format). By default, makedumpfile makes a DUMPFILE  in
43       the  kdump-compressed  format.  The kdump-compressed format is readable
44       only with the crash utility, and it can be smaller than the ELF  format
45       because of the compression support. The ELF format is readable with GDB
46       and the crash utility.  If a user wants to use GDB, DUMPFILE format has
47       to be explicitly specified to be the ELF format.
48
49       To  analyze  the first kernel's memory usage, makedumpfile can refer to
50       VMCOREINFO instead of VMLINUX. VMCOREINFO contains the  first  kernel's
51       information  (structure  size,  field  offset, etc.), and VMCOREINFO is
52       small enough to be included into the second kernel's initrd.
53       If the second kernel is running on its initrd without mounting  a  root
54       file  system,  makedumpfile  cannot refer to VMLINUX because the second
55       kernel's initrd cannot include a large file like VMLINUX. To solve  the
56       problem,  makedumpfile  makes  VMCOREINFO  beforehand, and it refers to
57       VMCOREINFO instead of VMLINUX while the second kernel is running.
58       VMCORE has contained VMCOREINFO since linux-2.6.24, and a user does not
59       need to specify neither -x nor -i option.
60
61       If the second kernel is running on its initrd without mounting any file
62       system, a user needs to transport the dump data to a  remote  host.  To
63       transport  the  dump data by SSH, makedumpfile outputs the dump data in
64       the intermediate format (the flattened format) to the standard  output.
65       By piping the output data to SSH, a user can transport the dump data to
66       a remote host. Note that analysis tools cannot read the flattened  for‐
67       mat  directly,  so  on a remote host the received data in the flattened
68       format needs to be rearranged to a readable DUMPFILE  format  by  make‐
69       dumpfile (or makedumpfile-R.pl).
70
71       makedumpfile can read a DUMPFILE in the kdump-compressed format instead
72       of VMCORE and re-filter it. This feature is useful  in  situation  that
73       users need to reduce the file size of DUMPFILE for sending it somewhere
74       by ftp/scp/etc. (If all of the page types, which are specified by a new
75       dump_level, are excluded from an original DUMPFILE already, a new DUMP‐
76       FILE is the same as an original DUMPFILE.)
77       For example, makedumpfile can create a DUMPFILE of dump_level  31  from
78       the one of dump_level 3 like the following:
79       Example:
80       # makedumpfile -c -d 3 /proc/vmcore dumpfile.1
81       # makedumpfile -c -d 31 dumpfile.1 dumpfile.2
82
83

OPTIONS

85       -c     Compress dump data by each page.
86              A  user  cannot  specify this option with -E option, because the
87              ELF format does not support compressed data.
88              Example:
89              # makedumpfile -c -d 31 -x vmlinux /proc/vmcore dumpfile
90
91
92       -d dump_level
93              Specify the type of unnecessary page for analysis.
94              Pages of the specified type are not copied to DUMPFILE. The page
95              type marked in the following table is excluded. A user can spec‐
96              ify multiple page types by setting the sum of each page type for
97              dump_level.  The  maximum  of  dump_level  is  31.  Note  that a
98              dump_level for Xen dump filtering is 0 or 1 on a  machine  other
99              than  x86_64  (On an x86_64 machine, it is possible to specify 2
100              or bigger as a dump_level).
101              If specifying multiple dump_levels with the delimiter ',', make‐
102              dumpfile  retries  to create a DUMPFILE by other dump_level when
103              "No space on device" error happens. For example,  if  dump_level
104              is "11,31" and makedumpfile fails by dump_level 11, makedumpfile
105              retries it by dump_level 31.
106              Example:
107              # makedumpfile -d 11 -x vmlinux /proc/vmcore dumpfile
108              # makedumpfile -d 11,31 -x vmlinux /proc/vmcore dumpfile
109
110                dump | zero | cache|cache  | user | free
111               level | page | page |private| data | page
112              -------+------+------+-------+------+------
113                   0 |      |      |       |      |
114                   1 |  X   |      |       |      |
115                   2 |      |  X   |       |      |
116                   3 |  X   |  X   |       |      |
117                   4 |      |  X   |  X    |      |
118                   5 |  X   |  X   |  X    |      |
119                   6 |      |  X   |  X    |      |
120                   7 |  X   |  X   |  X    |      |
121                   8 |      |      |       |  X   |
122                   9 |  X   |      |       |  X   |
123                  10 |      |  X   |       |  X   |
124                  11 |  X   |  X   |       |  X   |
125                  12 |      |  X   |  X    |  X   |
126                  13 |  X   |  X   |  X    |  X   |
127                  14 |      |  X   |  X    |  X   |
128                  15 |  X   |  X   |  X    |  X   |
129                  16 |      |      |       |      |  X
130                  17 |  X   |      |       |      |  X
131                  18 |      |  X   |       |      |  X
132                  19 |  X   |  X   |       |      |  X
133                  20 |      |  X   |  X    |      |  X
134                  21 |  X   |  X   |  X    |      |  X
135                  22 |      |  X   |  X    |      |  X
136                  23 |  X   |  X   |  X    |      |  X
137                  24 |      |      |       |  X   |  X
138                  25 |  X   |      |       |  X   |  X
139                  26 |      |  X   |       |  X   |  X
140                  27 |  X   |  X   |       |  X   |  X
141                  28 |      |  X   |  X    |  X   |  X
142                  29 |  X   |  X   |  X    |  X   |  X
143                  30 |      |  X   |  X    |  X   |  X
144                  31 |  X   |  X   |  X    |  X   |  X
145
146
147
148       -E     Create DUMPFILE in the ELF format.
149              This option cannot be specified with -c option, because the  ELF
150              format does not support compressed data.
151              Example:
152              # makedumpfile -E -d 31 -x vmlinux /proc/vmcore dumpfile
153
154
155       -f     Force existing DUMPFILE to be overwritten.
156              Example:
157              # makedumpfile -f -d 31 -x vmlinux /proc/vmcore dumpfile
158              This command overwrites DUMPFILE even if it already exists.
159
160
161       -x VMLINUX
162              Specify  the  first  kernel's  VMLINUX with debug information to
163              analyze the first kernel's memory usage.
164              This option is necessary if VMCORE does not contain  VMCOREINFO,
165              [-i VMCOREINFO] is not specified, and dump_level is 2 or more.
166              The  page  size of the first kernel and the second kernel should
167              match.
168              Example:
169              # makedumpfile -d 31 -x vmlinux /proc/vmcore dumpfile
170
171
172       -i VMCOREINFO
173              Specify VMCOREINFO instead of VMLINUX for  analyzing  the  first
174              kernel's memory usage.
175              VMCOREINFO  should  be  made  beforehand by makedumpfile with -g
176              option, and it contains the first kernel's information.
177              This option is necessary if VMCORE does not contain  VMCOREINFO,
178              [-x VMLINUX] is not specified, and dump_level is 2 or more.
179              Example:
180              # makedumpfile -d 31 -i vmcoreinfo /proc/vmcore dumpfile
181
182
183       -g VMCOREINFO
184              Generate  VMCOREINFO  from the first kernel's VMLINUX with debug
185              information.
186              VMCOREINFO must be generated on the system that is  running  the
187              first kernel. With -i option, a user can specify VMCOREINFO gen‐
188              erated on the other system that is running the same  first  ker‐
189              nel. [-x VMLINUX] must be specified.
190              Example:
191              # makedumpfile -g vmcoreinfo -x vmlinux
192
193
194       -F     Output  the  dump  data  in the flattened format to the standard
195              output for transporting the dump data by SSH.
196              Analysis tools cannot read the flattened  format  directly.  For
197              analysis,  the dump data in the flattened format should be rear‐
198              ranged to a normal DUMPFILE (readable with analysis tools) by -R
199              option.  By which option is specified with -F option, the format
200              of the rearranged DUMPFILE is fixed.   In  other  words,  it  is
201              impossible  to specify the DUMPFILE format when the dump data is
202              rearranged with -R option.  If  specifying  -E  option  with  -F
203              option, the format of the rearranged DUMPFILE is the ELF format.
204              Otherwise, it is the kdump-compressed format. All  the  messages
205              are  output  to standard error output by -F option because stan‐
206              dard output is used for the dump data.
207              Example:
208              # makedumpfile -F -c -d 31 -x vmlinux /proc/vmcore \
209              | ssh user@host "cat > dumpfile.tmp"
210              # makedumpfile -F -c -d 31 -x vmlinux /proc/vmcore \
211              | ssh user@host "makedumpfile -R dumpfile"
212              # makedumpfile -F -E -d 31 -i vmcoreinfo  /proc/vmcore \
213              | ssh user@host "makedumpfile -R dumpfile"
214              # makedumpfile -F -E --xen-vmcoreinfo VMCOREINFO /proc/vmcore \
215              | ssh user@host "makedumpfile -R dumpfile"
216
217
218       -R     Rearrange the dump data in the flattened format from  the  stan‐
219              dard input to a normal DUMPFILE (readable with analysis tools).
220              Example:
221              # makedumpfile -R dumpfile < dumpfile.tmp
222              # makedumpfile -F -d 31 -x vmlinux /proc/vmcore \
223              | ssh user@host "makedumpfile -R dumpfile"
224
225              Instead  of  using  -R option, a perl script "makedumpfile-R.pl"
226              rearranges the dump data in the flattened  format  to  a  normal
227              DUMPFILE,  too. The perl script does not depend on architecture,
228              and most systems have perl command.  Even if a remote host  does
229              not have makedumpfile, it is possible to rearrange the dump data
230              in the flattened format to a readable DUMPFILE on a remote  host
231              by running this script.
232              Example:
233              # makedumpfile -F -d 31 -x vmlinux /proc/vmcore \
234              | ssh user@host "makedumpfile-R.pl dumpfile"
235
236
237       --split
238              Split the dump data to multiple DUMPFILEs in parallel. If speci‐
239              fying DUMPFILEs on different storage devices, a device can share
240              I/O  load  with other devices and it reduces time for saving the
241              dump data. The file size of each DUMPFILE is  smaller  than  the
242              system  memory size which is divided by the number of DUMPFILEs.
243              This feature supports only the kdump-compressed format.
244              Example:
245              # makedumpfile --split -d 31 -x vmlinux  /proc/vmcore  dumpfile1
246              dumpfile2
247
248
249       --reassemble
250              Reassemble  multiple  DUMPFILEs,  which  are  created by --split
251              option, into one DUMPFILE. dumpfile1 and dumpfile2 are  reassem‐
252              bled into dumpfile on the following example.
253              Example:
254              # makedumpfile --reassemble dumpfile1 dumpfile2 dumpfile
255
256
257       --xen-syms XEN-SYMS
258              Specify the XEN-SYMS with debug information to analyze the xen's
259              memory  usage.   This  option  extracts  the  part  of  xen  and
260              domain-0.  -E option must be specified with this option.
261              Example:
262              # makedumpfile -E --xen-syms xen-syms /proc/vmcore dumpfile
263
264
265       --xen-vmcoreinfo VMCOREINFO
266              Specify  VMCOREINFO  instead of XEN-SYMS for analyzing the xen's
267              memory usage.
268              VMCOREINFO should be made beforehand  by  makedumpfile  with  -g
269              option,  and  it contains the xen's information.  -E option must
270              be specified with this option.
271              Example:
272              # makedumpfile -E --xen-vmcoreinfo VMCOREINFO /proc/vmcore dump‐
273              file
274
275
276       -X     Exclude  all  the user domain pages from Xen kdump's VMCORE, and
277              extracts the part of xen and domain-0. If VMCORE contains VMCOR‐
278              EINFO  for  Xen,  it  is not necessary to specify --xen-syms and
279              --xen-vmcoreinfo.  -E option must be specified with this option.
280              Example:
281              # makedumpfile -E -X /proc/vmcore dumpfile
282
283
284       --xen_phys_start xen_phys_start_address
285              This   option    is    only    for    x86_64.     Specify    the
286              xen_phys_start_address,  if the xen code/data is relocatable and
287              VMCORE does not contain xen_phys_start_address in the CRASHINFO.
288              xen_phys_start_address can be taken from the line of "Hypervisor
289              code and data" in /proc/iomem. For example,  specify  0xcee00000
290              as xen_phys_start_address if /proc/iomem is the following:
291                -------------------------------------------------------
292                # cat /proc/iomem
293                ...
294                  cee00000-cfd99999 : Hypervisor code and data
295                ...
296                -------------------------------------------------------
297
298              Example:
299              #  makedumpfile  -E  -X --xen_phys_start 0xcee00000 /proc/vmcore
300              dumpfile
301
302
303       --message-level message_level
304              Specify the message types.
305              Users can restrict outputs printed by  specifying  message_level
306              with  this option. The message type marked with an X in the fol‐
307              lowing table is printed. For example, according  to  the  table,
308              specifying  7  as message_level means progress indicator, common
309              message, and error message are printed, and this  is  a  default
310              value. Note that the maximum value of message_level is 31.
311
312               message | progress | common  | error   | debug   | report
313               level   | indicator| message | message | message | message
314              ---------+----------+---------+---------+---------+---------
315                     0 |          |         |         |         |
316                     1 |    X     |         |         |         |
317                     2 |          |    X    |         |         |
318                     3 |    X     |    X    |         |         |
319                     4 |          |         |    X    |         |
320                     5 |    X     |         |    X    |         |
321                     6 |          |    X    |    X    |         |
322                   * 7 |    X     |    X    |    X    |         |
323                     8 |          |         |         |    X    |
324                     9 |    X     |         |         |    X    |
325                    10 |          |    X    |         |    X    |
326                    11 |    X     |    X    |         |    X    |
327                    12 |          |         |    X    |    X    |
328                    13 |    X     |         |    X    |    X    |
329                    14 |          |    X    |    X    |    X    |
330                    15 |    X     |    X    |    X    |    X    |
331                    16 |          |         |         |         |    X
332                    17 |    X     |         |         |         |    X
333                    18 |          |    X    |         |         |    X
334                    19 |    X     |    X    |         |         |    X
335                    20 |          |         |    X    |         |    X
336                    21 |    X     |         |    X    |         |    X
337                    22 |          |    X    |    X    |         |    X
338                    23 |    X     |    X    |    X    |         |    X
339                    24 |          |         |         |    X    |    X
340                    25 |    X     |         |         |    X    |    X
341                    26 |          |    X    |         |    X    |    X
342                    27 |    X     |    X    |         |    X    |    X
343                    28 |          |         |    X    |    X    |    X
344                    29 |    X     |         |    X    |    X    |    X
345                    30 |          |    X    |    X    |    X    |    X
346                    31 |    X     |    X    |    X    |    X    |    X
347
348
349       --vtop virtual_address
350              This  option is useful, when user debugs the translation problem
351              of virtual address. If specifing virtual_address,  its  physical
352              address  is  printed.  It  makes debugging easy by comparing the
353              output of this option with the one of "vtop" subcommand  of  the
354              crash utility.  "--vtop" option only prints the translation out‐
355              put, and it does not affect the dumpfile creation.
356
357
358       --dump-dmesg
359              This option  overrides  the  normal  behavior  of  makedumpfile.
360              Instead  of  compressing  and  filtering  a  VMCORE  to  make it
361              smaller, it simply extracts the dmesg  log  from  a  VMCORE  and
362              writes it to the specified LOGFILE. If a VMCORE does not contain
363              VMCOREINFO for dmesg, it is necessary to specfiy [-x VMLINUX] or
364              [-i VMCOREINFO].
365
366              Example:
367              # makedumpfile --dump-dmesg /proc/vmcore dmesgfile
368              # makedumpfile --dump-dmesg -x vmlinux /proc/vmcore dmesgfile
369
370
371       -D     Print debugging message.
372
373
374       -b <order>
375              cache  2^order  pages  in ram when generating vmcore info before
376              writing to output
377
378
379       -h     Show help message.
380
381
382       -v     Show the version of makedumpfile.
383
384

DIAGNOSTICS

386       makedumpfile exits with the following value.
387
388       0 : makedumpfile succeeded.
389
390       1 : makedumpfile failed without the following reasons.
391
392       2 : makedumpfile failed due to the different version  between   VMLINUX
393       and VMCORE.
394
395       3 : makedumpfile failed due to the analysis error of the memory.
396
397

AUTHORS

399       Written by Masaki Tachibana, and Ken'ichi Ohmichi.
400
401

SEE ALSO

403       crash(8), gdb(1), kexec(8)
404
405
406
407
408makedumpfile v1.3.5            11 November 2009                MAKEDUMPFILE(8)
Impressum