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   [OPTION] -x VMLINUX [--config FILTERCONFIGFILE] [--eppic
12       EPPICMACRO] VMCORE DUMPFILE
13       makedumpfile -R DUMPFILE
14       makedumpfile --split [OPTION] [-x VMLINUX|-i VMCOREINFO]  VMCORE  DUMP‐
15       FILE1 DUMPFILE2 [DUMPFILE3 ..]
16       makedumpfile --reassemble DUMPFILE1 DUMPFILE2 [DUMPFILE3 ..] DUMPFILE
17       makedumpfile -g VMCOREINFO -x VMLINUX
18       makedumpfile   -E   [--xen-syms  XEN-SYMS|--xen-vmcoreinfo  VMCOREINFO]
19       VMCORE DUMPFILE
20       makedumpfile --dump-dmesg [-x VMLINUX|-i VMCOREINFO] VMCORE LOGFILE
21       makedumpfile    [OPTION] -x VMLINUX --diskset=VMCORE1 --diskset=VMCORE2
22       [--diskset=VMCORE3 ..] DUMPFILE
23       makedumpfile -h
24       makedumpfile -v
25

DESCRIPTION

27       With kdump, the memory image of the first kernel (called "panicked ker‐
28       nel") can be taken as /proc/vmcore  while  the  second  kernel  (called
29       "kdump  kernel"  or  "capture kernel") is running. This document repre‐
30       sents /proc/vmcore as VMCORE. makedumpfile makes a  small  DUMPFILE  by
31       compressing  dump  data or by excluding unnecessary pages for analysis,
32       or both. makedumpfile needs the first kernel's  debug  information,  so
33       that  it  can  distinguish unnecessary pages by analyzing how the first
34       kernel uses the memory.  The information can be taken from  VMLINUX  or
35       VMCOREINFO.
36
37       makedumpfile  can  exclude  the  following types of pages while copying
38       VMCORE to DUMPFILE, and a user can choose which type of pages  will  be
39       excluded.
40       - Pages filled with zero
41       - Cache pages without private pages
42       - All cache pages with private pages
43       - User process data pages
44       - Free pages
45
46       makedumpfile  provides  two  DUMPFILE  formats  (the ELF format and the
47       kdump-compressed format). By default, makedumpfile makes a DUMPFILE  in
48       the  kdump-compressed  format.  The kdump-compressed format is readable
49       only with the crash utility, and it can be smaller than the ELF  format
50       because of the compression support. The ELF format is readable with GDB
51       and the crash utility.  If a user wants to use GDB, DUMPFILE format has
52       to be explicitly specified to be the ELF format.
53
54       Apart  from  the  exclusion of unnecessary pages mentioned above, make‐
55       dumpfile allows user to filter out targeted  kernel  data.  The  filter
56       config  file  can be used to specify kernel/module symbols and its mem‐
57       bers that need to be filtered out through  the  erase  command  syntax.
58       makedumpfile  reads  the  filter  config  and builds the list of memory
59       addresses and its sizes after processing filter  commands.  The  memory
60       locations  that require to be filtered out are then poisoned with char‐
61       acter 'X' (58 in Hex). Refer to makedumpfile.conf(5) for file format.
62
63       Eppic macros can also be used to specify kernel symbols and its members
64       that need to be filtered. Eppic provides C semantics including language
65       constructs such as conditional statements, logical and arithmetic oper‐
66       ators,  functions,  nested  loops  to  traverse  and erase kernel data.
67       --eppic requires eppic_makedumpfile.so and eppic  library.  eppic_make‐
68       dumpfile.so   can   be   built   from  makedumpfile  source.  Refer  to
69       http://code.google.com/p/eppic/ to build eppic library  libeppic.a  and
70       for more information on writing eppic macros.
71
72       To  analyze  the first kernel's memory usage, makedumpfile can refer to
73       VMCOREINFO instead of VMLINUX. VMCOREINFO contains the  first  kernel's
74       information  (structure  size,  field  offset, etc.), and VMCOREINFO is
75       small enough to be included into the second kernel's initrd.
76       If the second kernel is running on its initrd without mounting  a  root
77       file  system,  makedumpfile  cannot refer to VMLINUX because the second
78       kernel's initrd cannot include a large file like VMLINUX. To solve  the
79       problem,  makedumpfile  makes  VMCOREINFO  beforehand, and it refers to
80       VMCOREINFO instead of VMLINUX while the second kernel is running.
81       VMCORE has contained VMCOREINFO since linux-2.6.24, and a user does not
82       need to specify neither -x nor -i option.
83
84       If the second kernel is running on its initrd without mounting any file
85       system, a user needs to transport the dump data to a  remote  host.  To
86       transport  the  dump data by SSH, makedumpfile outputs the dump data in
87       the intermediate format (the flattened format) to the standard  output.
88       By piping the output data to SSH, a user can transport the dump data to
89       a remote host. Note that analysis tools (crash utility  before  version
90       5.1.2 or GDB) cannot read the flattened format directly, so on a remote
91       host the received data in the flattened format needs to  be  rearranged
92       to a readable DUMPFILE format by makedumpfile (or makedumpfile-R.pl).
93
94       makedumpfile can read a DUMPFILE in the kdump-compressed format instead
95       of VMCORE and re-filter it. This feature is useful  in  situation  that
96       users need to reduce the file size of DUMPFILE for sending it somewhere
97       by ftp/scp/etc. (If all of the page types, which are specified by a new
98       dump_level, are excluded from an original DUMPFILE already, a new DUMP‐
99       FILE is the same as an original DUMPFILE.)
100       For example, makedumpfile can create a DUMPFILE of dump_level  31  from
101       the one of dump_level 3 like the following:
102       Example:
103       # makedumpfile -c -d 3 /proc/vmcore dumpfile.1
104       # makedumpfile -c -d 31 dumpfile.1 dumpfile.2
105
106       makedumpfile  can read VMCORE(s) in three kinds of sadump formats: sin‐
107       gle partition format, diskset format and media backup format,  and  can
108       convert  each  of  them into kdump-compressed format with filtering and
109       compression processing. Note that for VMCORE(s) created by sadump,  you
110       always  need  to  pass  VMLINUX  with -x option. Also, to pass multiple
111       VMCOREs created on diskset configuration, you  need  to  use  --diskset
112       option.
113
114

OPTIONS

116       -c,-l,-p
117              Compress  dump  data  by each page using zlib for -c option, lzo
118              for -l option  or  snappy  for  -p  option.   (-l  option  needs
119              USELZO=on and -p option needs USESNAPPY=on when building)
120              A  user  cannot  specify this option with -E option, because the
121              ELF format does not support compressed data.
122              Example:
123              # makedumpfile -c -d 31 -x vmlinux /proc/vmcore dumpfile
124
125
126       -d dump_level
127              Specify the type of unnecessary page for analysis.
128              Pages of the specified type are not copied to DUMPFILE. The page
129              type marked in the following table is excluded. A user can spec‐
130              ify multiple page types by setting the sum of each page type for
131              dump_level.  The  maximum  of  dump_level  is  31.  Note  that a
132              dump_level for Xen dump filtering is 0 or 1 on a  machine  other
133              than  x86_64  (On an x86_64 machine, it is possible to specify 2
134              or bigger as a dump_level).
135              If specifying multiple dump_levels with the delimiter ',', make‐
136              dumpfile  retries  to create a DUMPFILE by other dump_level when
137              "No space on device" error happens. For example,  if  dump_level
138              is "11,31" and makedumpfile fails by dump_level 11, makedumpfile
139              retries it by dump_level 31.
140              Example:
141              # makedumpfile -d 11 -x vmlinux /proc/vmcore dumpfile
142              # makedumpfile -d 11,31 -x vmlinux /proc/vmcore dumpfile
143
144                     |      |cache  |cache  |      |
145                dump | zero |without|with   | user | free
146               level | page |private|private| data | page
147              -------+------+-------+-------+------+------
148                   0 |      |       |       |      |
149                   1 |  X   |       |       |      |
150                   2 |      |   X   |       |      |
151                   3 |  X   |   X   |       |      |
152                   4 |      |   X   |   X   |      |
153                   5 |  X   |   X   |   X   |      |
154                   6 |      |   X   |   X   |      |
155                   7 |  X   |   X   |   X   |      |
156                   8 |      |       |       |  X   |
157                   9 |  X   |       |       |  X   |
158                  10 |      |   X   |       |  X   |
159                  11 |  X   |   X   |       |  X   |
160                  12 |      |   X   |   X   |  X   |
161                  13 |  X   |   X   |   X   |  X   |
162                  14 |      |   X   |   X   |  X   |
163                  15 |  X   |   X   |   X   |  X   |
164                  16 |      |       |       |      |  X
165                  17 |  X   |       |       |      |  X
166                  18 |      |   X   |       |      |  X
167                  19 |  X   |   X   |       |      |  X
168                  20 |      |   X   |   X   |      |  X
169                  21 |  X   |   X   |   X   |      |  X
170                  22 |      |   X   |   X   |      |  X
171                  23 |  X   |   X   |   X   |      |  X
172                  24 |      |       |       |  X   |  X
173                  25 |  X   |       |       |  X   |  X
174                  26 |      |   X   |       |  X   |  X
175                  27 |  X   |   X   |       |  X   |  X
176                  28 |      |   X   |   X   |  X   |  X
177                  29 |  X   |   X   |   X   |  X   |  X
178                  30 |      |   X   |   X   |  X   |  X
179                  31 |  X   |   X   |   X   |  X   |  X
180
181
182
183       -E     Create DUMPFILE in the ELF format.
184              This option cannot be specified with either of -c option  or  -l
185              option, because the ELF format does not support compressed data.
186              Example:
187              # makedumpfile -E -d 31 -x vmlinux /proc/vmcore dumpfile
188
189
190       -f     Force existing DUMPFILE to be overwritten.
191              Example:
192              # makedumpfile -f -d 31 -x vmlinux /proc/vmcore dumpfile
193              This command overwrites DUMPFILE even if it already exists.
194
195
196       -x VMLINUX
197              Specify  the  first  kernel's  VMLINUX with debug information to
198              analyze the first kernel's memory usage.
199              This option is necessary if VMCORE does not contain  VMCOREINFO,
200              [-i VMCOREINFO] is not specified, and dump_level is 2 or more.
201              The  page  size of the first kernel and the second kernel should
202              match.
203              Example:
204              # makedumpfile -d 31 -x vmlinux /proc/vmcore dumpfile
205
206
207       -i VMCOREINFO
208              Specify VMCOREINFO instead of VMLINUX for  analyzing  the  first
209              kernel's memory usage.
210              VMCOREINFO  should  be  made  beforehand by makedumpfile with -g
211              option, and it contains the first kernel's information.
212              This option is necessary if VMCORE does not contain  VMCOREINFO,
213              [-x VMLINUX] is not specified, and dump_level is 2 or more.
214              Example:
215              # makedumpfile -d 31 -i vmcoreinfo /proc/vmcore dumpfile
216
217
218       -g VMCOREINFO
219              Generate  VMCOREINFO  from the first kernel's VMLINUX with debug
220              information.
221              VMCOREINFO must be generated on the system that is  running  the
222              first kernel. With -i option, a user can specify VMCOREINFO gen‐
223              erated on the other system that is running the same  first  ker‐
224              nel. [-x VMLINUX] must be specified.
225              Example:
226              # makedumpfile -g vmcoreinfo -x vmlinux
227
228
229       --config FILTERCONFIGFILE
230              Used  in conjunction with -x VMLINUX option, to specify the fil‐
231              ter config file FILTERCONFIGFILE that contains erase commands to
232              filter  out desired kernel data from vmcore while creating DUMP‐
233              FILE. For  filter  command  syntax  please  refer  to  makedump‐
234              file.conf(5).
235
236
237       --eppic EPPICMACRO
238              Used in conjunction with -x VMLINUX option, to specify the eppic
239              macro file that contains filter rules or directory that contains
240              eppic  macro files to filter out desired kernel data from vmcore
241              while creating DUMPFILE.  When directory is specified,  all  the
242              eppic macros in the directory are processed.
243
244
245       -F     Output  the  dump  data  in the flattened format to the standard
246              output for transporting the dump data by SSH.
247              Analysis tools (crash utility before version 5.1.2 or GDB)  can‐
248              not  read  the flattened format directly. For analysis, the dump
249              data in the flattened format should be rearranged  to  a  normal
250              DUMPFILE  (readable  with analysis tools) by -R option. By which
251              option is specified with -F option, the format of the rearranged
252              DUMPFILE  is fixed.  In other words, it is impossible to specify
253              the DUMPFILE format when the dump data  is  rearranged  with  -R
254              option.  If  specifying  -E option with -F option, the format of
255              the rearranged DUMPFILE is the ELF format. Otherwise, it is  the
256              kdump-compressed format. All the messages are output to standard
257              error output by -F option because standard output  is  used  for
258              the dump data.
259              Example:
260              # makedumpfile -F -c -d 31 -x vmlinux /proc/vmcore \
261              | ssh user@host "cat > dumpfile.tmp"
262              # makedumpfile -F -c -d 31 -x vmlinux /proc/vmcore \
263              | ssh user@host "makedumpfile -R dumpfile"
264              # makedumpfile -F -E -d 31 -i vmcoreinfo  /proc/vmcore \
265              | ssh user@host "makedumpfile -R dumpfile"
266              # makedumpfile -F -E --xen-vmcoreinfo VMCOREINFO /proc/vmcore \
267              | ssh user@host "makedumpfile -R dumpfile"
268
269
270       -R     Rearrange  the  dump data in the flattened format from the stan‐
271              dard input to a normal DUMPFILE (readable with analysis tools).
272              Example:
273              # makedumpfile -R dumpfile < dumpfile.tmp
274              # makedumpfile -F -d 31 -x vmlinux /proc/vmcore \
275              | ssh user@host "makedumpfile -R dumpfile"
276
277              Instead of using -R option, a  perl  script  "makedumpfile-R.pl"
278              rearranges  the  dump  data  in the flattened format to a normal
279              DUMPFILE, too. The perl script does not depend on  architecture,
280              and  most systems have perl command.  Even if a remote host does
281              not have makedumpfile, it is possible to rearrange the dump data
282              in  the flattened format to a readable DUMPFILE on a remote host
283              by running this script.
284              Example:
285              # makedumpfile -F -d 31 -x vmlinux /proc/vmcore \
286              | ssh user@host "makedumpfile-R.pl dumpfile"
287
288
289       --split
290              Split the dump data to multiple DUMPFILEs in parallel. If speci‐
291              fying DUMPFILEs on different storage devices, a device can share
292              I/O load with other devices and it reduces time for  saving  the
293              dump  data.  The  file size of each DUMPFILE is smaller than the
294              system memory size which is divided by the number of  DUMPFILEs.
295              This feature supports only the kdump-compressed format.
296              Example:
297              #  makedumpfile  --split -d 31 -x vmlinux /proc/vmcore dumpfile1
298              dumpfile2
299
300
301       --reassemble
302              Reassemble multiple DUMPFILEs,  which  are  created  by  --split
303              option,  into one DUMPFILE. dumpfile1 and dumpfile2 are reassem‐
304              bled into dumpfile on the following example.
305              Example:
306              # makedumpfile --reassemble dumpfile1 dumpfile2 dumpfile
307
308
309       -b <order>
310              Cache 2^order pages in ram when generating DUMPFILE before writ‐
311              ing to output.  The default value is 4.
312
313
314       --cyclic-buffer buffer_size
315              Specify the buffer size in kilo bytes for analysis in the cyclic
316              mode.  In the cyclic mode, the number of cycles  is  represented
317              as:
318
319                  num_of_cycles  =  system_memory  /  (buffer_size  *  1024  *
320              bit_per_bytes * page_size )
321
322              The lesser  number  of  cycles,  the  faster  working  speed  is
323              expected.   By default, buffer_size will be calculated automati‐
324              cally depending on system memory size, so ordinary  users  don't
325              need to specify this option.
326
327              Example:
328              #   makedumpfile   --cyclic-buffer   1024   -d   31  -x  vmlinux
329              /proc/vmcore dumpfile
330
331
332       --non-cyclic
333              Running in the non-cyclic mode, this mode uses the old filtering
334              logic  same as v1.4.4 or before.  If you feel the cyclic mode is
335              too slow, please try this mode.
336              Example:
337              # makedumpfile --non-cyclic -d 31 -x vmlinux /proc/vmcore  dump‐
338              file
339
340
341       --non-mmap
342              Never  use  mmap(2)  to read VMCORE even if it supports mmap(2).
343              Generally, reading VMCORE with mmap(2) is  faster  than  without
344              it,  so  ordinary users don't need to specify this option.  This
345              option is mainly for debugging.
346              Example:
347              # makedumpfile --non-mmap -d 31 -x vmlinux /proc/vmcore dumpfile
348
349
350       --xen-syms XEN-SYMS
351              Specify the XEN-SYMS with debug information to analyze the xen's
352              memory  usage.   This  option  extracts  the  part  of  xen  and
353              domain-0.  -E option must be specified with this option.
354              Example:
355              # makedumpfile -E --xen-syms xen-syms /proc/vmcore dumpfile
356
357
358       --xen-vmcoreinfo VMCOREINFO
359              Specify VMCOREINFO instead of XEN-SYMS for analyzing  the  xen's
360              memory usage.
361              VMCOREINFO  should  be  made  beforehand by makedumpfile with -g
362              option, and it contains the xen's information.  -E  option  must
363              be specified with this option.
364              Example:
365              # makedumpfile -E --xen-vmcoreinfo VMCOREINFO /proc/vmcore dump‐
366              file
367
368
369       -X     Exclude all the user domain pages from Xen kdump's  VMCORE,  and
370              extracts the part of xen and domain-0. If VMCORE contains VMCOR‐
371              EINFO for Xen, it is not necessary  to  specify  --xen-syms  and
372              --xen-vmcoreinfo.  -E option must be specified with this option.
373              Example:
374              # makedumpfile -E -X /proc/vmcore dumpfile
375
376
377       --xen_phys_start xen_phys_start_address
378              This    option    is    only    for    x86_64.     Specify   the
379              xen_phys_start_address, if the xen code/data is relocatable  and
380              VMCORE does not contain xen_phys_start_address in the CRASHINFO.
381              xen_phys_start_address can be taken from the line of "Hypervisor
382              code  and  data" in /proc/iomem. For example, specify 0xcee00000
383              as xen_phys_start_address if /proc/iomem is the following:
384                -------------------------------------------------------
385                # cat /proc/iomem
386                ...
387                  cee00000-cfd99999 : Hypervisor code and data
388                ...
389                -------------------------------------------------------
390
391              Example:
392              # makedumpfile -E -X  --xen_phys_start  0xcee00000  /proc/vmcore
393              dumpfile
394
395
396       --message-level message_level
397              Specify the message types.
398              Users  can  restrict outputs printed by specifying message_level
399              with this option. The message type marked with an X in the  fol‐
400              lowing  table  is  printed. For example, according to the table,
401              specifying 7 as message_level means progress  indicator,  common
402              message,  and  error  message are printed, and this is a default
403              value. Note that the maximum value of message_level is 31.
404
405               message | progress | common  | error   | debug   | report
406               level   | indicator| message | message | message | message
407              ---------+----------+---------+---------+---------+---------
408                     0 |          |         |         |         |
409                     1 |    X     |         |         |         |
410                     2 |          |    X    |         |         |
411                     3 |    X     |    X    |         |         |
412                     4 |          |         |    X    |         |
413                     5 |    X     |         |    X    |         |
414                     6 |          |    X    |    X    |         |
415                   * 7 |    X     |    X    |    X    |         |
416                     8 |          |         |         |    X    |
417                     9 |    X     |         |         |    X    |
418                    10 |          |    X    |         |    X    |
419                    11 |    X     |    X    |         |    X    |
420                    12 |          |         |    X    |    X    |
421                    13 |    X     |         |    X    |    X    |
422                    14 |          |    X    |    X    |    X    |
423                    15 |    X     |    X    |    X    |    X    |
424                    16 |          |         |         |         |    X
425                    17 |    X     |         |         |         |    X
426                    18 |          |    X    |         |         |    X
427                    19 |    X     |    X    |         |         |    X
428                    20 |          |         |    X    |         |    X
429                    21 |    X     |         |    X    |         |    X
430                    22 |          |    X    |    X    |         |    X
431                    23 |    X     |    X    |    X    |         |    X
432                    24 |          |         |         |    X    |    X
433                    25 |    X     |         |         |    X    |    X
434                    26 |          |    X    |         |    X    |    X
435                    27 |    X     |    X    |         |    X    |    X
436                    28 |          |         |    X    |    X    |    X
437                    29 |    X     |         |    X    |    X    |    X
438                    30 |          |    X    |    X    |    X    |    X
439                    31 |    X     |    X    |    X    |    X    |    X
440
441
442       --vtop virtual_address
443              This option is useful, when user debugs the translation  problem
444              of  virtual  address. If specifing virtual_address, its physical
445              address is printed. It makes debugging  easy  by  comparing  the
446              output  of  this option with the one of "vtop" subcommand of the
447              crash utility.  "--vtop" option only prints the translation out‐
448              put, and it does not affect the dumpfile creation.
449
450
451       --dump-dmesg
452              This  option  overrides  the  normal  behavior  of makedumpfile.
453              Instead of  compressing  and  filtering  a  VMCORE  to  make  it
454              smaller,  it  simply  extracts  the  dmesg log from a VMCORE and
455              writes it to the specified LOGFILE. If a VMCORE does not contain
456              VMCOREINFO for dmesg, it is necessary to specfiy [-x VMLINUX] or
457              [-i VMCOREINFO].
458
459              Example:
460              # makedumpfile --dump-dmesg /proc/vmcore dmesgfile
461              # makedumpfile --dump-dmesg -x vmlinux /proc/vmcore dmesgfile
462
463
464       --diskset=VMCORE
465              Specify multiple VMCOREs created on sadump diskset configuration
466              the  same number of times as the number of VMCOREs in increasing
467              order from left to right.  VMCOREs are assembled into  a  single
468              DUMPFILE.
469
470              Example:
471              #  makedumpfile  -x  vmlinux --diskset=vmcore1 --diskset=vmcore2
472              dumpfile
473
474
475       -D     Print debugging message.
476
477
478       -h (--help)
479              Show help message and LZO/snappy  support  status  (enabled/dis‐
480              abled).
481
482
483       -v     Show the version of makedumpfile.
484
485

ENVIRONMENT VARIABLES

487       TMPDIR  This environment variable is for a temporary memory bitmap file
488               only in the non-cyclic mode.  If your machine  has  a  lots  of
489               memory  and  you use tmpfs on /tmp, makedumpfile can fail for a
490               little memory in the 2nd kernel because  makedumpfile  makes  a
491               very  large temporary memory bitmap file in this case. To avoid
492               this failure, you can set a TMPDIR environment variable. If you
493               do  not  set  a  TMPDIR environment variable, makedumpfile uses
494               /tmp directory for a temporary bitmap file as a default.
495
496

DIAGNOSTICS

498       makedumpfile exits with the following value.
499
500       0 : makedumpfile succeeded.
501
502       1 : makedumpfile failed without the following reasons.
503
504       2 : makedumpfile failed due to the different version  between   VMLINUX
505       and VMCORE.
506
507       3 : makedumpfile failed due to the analysis error of the memory.
508
509

AUTHORS

511       Written by Masaki Tachibana, and Ken'ichi Ohmichi.
512
513

SEE ALSO

515       crash(8), gdb(1), kexec(8), makedumpfile.conf(5)
516
517
518
519
520makedumpfile v1.5.6               23 Apr 2014                  MAKEDUMPFILE(8)
Impressum