Kdump compressed format
Subsystems (2)
Hi,
is there any documentation how the kdump compressed format (or the diskdump format, from what it is derived) looks like? Beside of the source code of the tools that support it. ;-)
Thanks for any help!
Bernhard
Signature · 6 lines
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Hi Bernhard,
Quoted 3 lines · Bernhard Walle
is there any documentation how the kdump compressed format (or the diskdump format, from what it is derived) looks like? Beside of the source code of the tools that support it. ;-)
The kdump compressed format is supported by only the crash utility and makedumpfile command. gdb does not support it. I think that there is not any documentation about the kdump compressed format, then I wrote it. Is it enough ?
----------------------------------------------------------------------------
* The kdump compressed format
File offset
+------------------------------------------+ 0x0 | main header (struct disk_dump_header) | |------------------------------------------+ block 1 | sub header (struct kdump_sub_header) | |------------------------------------------+ block 2 | 1st-bitmap | |------------------------------------------+ block 2 + X blocks (aligned by block) | 2nd-bitmap | |------------------------------------------+ block 2 + 2 * X blocks (aligned by block) | page header for pfn 0 (struct page_desc) | | page header for pfn 1 (struct page_desc) | | : | | page header for pfn Z (struct page_desc) | |------------------------------------------| (not aligned by block) | page data (pfn 0) | | page data (pfn 1) | | : | | page data (pfn Z) | +------------------------------------------+
* main header
The main header of the kdump compressed format is the almost same as the one of diskdump. This header has the following members, and the member signature and header_version are different from diskdump.
struct disk_dump_header {
char signature[SIG_LEN]; /* = "KDUMP " */
int header_version; /* Dump header version */
struct new_utsname utsname; /* copy of system_utsname */
struct timeval timestamp; /* Time stamp */
unsigned int status; /* Above flags */
int block_size; /* Size of a block in byte */
int sub_hdr_size; /* Size of arch dependent header in blocks */
unsigned int bitmap_blocks; /* Size of Memory bitmap in
block */
unsigned int max_mapnr; /* = max_mapnr */
unsigned int total_ram_blocks;/* Number of blocks should be
written */
unsigned int device_blocks; /* Number of total blocks in
* the dump device */
unsigned int written_blocks; /* Number of written blocks */
unsigned int current_cpu; /* CPU# which handles dump */
int nr_cpus; /* Number of CPUs */
struct task_struct *tasks[0];
};
* sub header
The sub header of the kdump compressed format is orignal. This header has the member phys_base and dump_level. The member phys_base is for an x86_64 relocatable kernel, and the member dump_level has '-d' option's value of makedumpfile command.
struct kdump_sub_header {
unsigned long phys_base;
int dump_level; /* header_version 1 and later */
};* 1st-bitmap
The bit of 1st-bitmap presents either a page on memory hole, or not. If a page is on memory hole, the corresponding bit is off. Otherwise, it is on.
* 2nd-bitmap
The bit of 2nd-bitmap presents either a dumpable page, or not. If a page is on memory hole or excluded by makedumpfile command, the corresponding bit is off. Otherwise, it is on.
* page header
There are page headers corresponding to dumpable pages.
This header presents the corresponding page information (compressed, or not. etc.)
typedef struct page_desc {
off_t offset; /* the offset of the page data*/
unsigned int size; /* the size of this dump page */
unsigned int flags; /* flags */
unsigned long long page_flags; /* page flags */ } page_desc_t;
Thanks
Ken'ichi Ohmichi
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 9 lines · Ken'ichi Ohmichi
Quoted 3 lines · Bernhard Walle
is there any documentation how the kdump compressed format (or the diskdump format, from what it is derived) looks like? Beside of the source code of the tools that support it. ;-)
The kdump compressed format is supported by only the crash utility and makedumpfile command. gdb does not support it. I think that there is not any documentation about the kdump compressed format, then I wrote it. Is it enough ?
Thanks a lot! Yes, that gives me the overview I needed.
I grabbed your information and generated a manual page from it where I also want to describe the other dump formats (when I have some time left):
http://www.suse.de/~bwalle/kdump/
That's basically part of the SUSE kdump configuration, maintained in
http://freehg.org/u/bwalle/kdump/.
I just used asciidoc because I hate nroff. I hope it's ok for you to distribute that manual page.
However, if you wonder, I didn't need that information for documentation but for page size on PPC64 ... thanks again!
Bernhard
Signature · 6 lines
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Hi Bernhard,
Quoted 12 lines · Bernhard Walle
Quoted 8 lines · Ken'ichi Ohmichi
Quoted 3 lines · Bernhard Walle
is there any documentation how the kdump compressed format (or the diskdump format, from what it is derived) looks like? Beside of the source code of the tools that support it. ;-)
The kdump compressed format is supported by only the crash utility and makedumpfile command. gdb does not support it. I think that there is not any documentation about the kdump compressed format, then I wrote it. Is it enough ?
Thanks a lot! Yes, that gives me the overview I needed.
Quoted 8 lines
I grabbed your information and generated a manual page from it where I also want to describe the other dump formats (when I have some time left):
http://www.suse.de/~bwalle/kdump/That's basically part of the SUSE kdump configuration, maintained in
http://freehg.org/u/bwalle/kdump/.
Thank you for the information :-)
Quoted 2 lines
I just used asciidoc because I hate nroff. I hope it's ok for you to distribute that manual page.
The manual page is for its usage, and I feel it is better to describe the implementation on the other file (README or IMPLEMENTATION).
Thanks
Ken'ichi Ohmichi
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 5 lines · Ken'ichi Ohmichi
Quoted 3 lines
I just used asciidoc because I hate nroff. I hope it's ok for you to distribute that manual page.
The manual page is for its usage
Not the section 5, which is about file formats. But since it's asciidoc, I can also create a HTML / PDF documentation from it later when I'm finished with other file formats.
Bernhard
Signature · 6 lines
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Hi Bernhard,
Sorry for my late response.
Quoted 16 lines · Bernhard Walle
Quoted 8 lines · Ken'ichi Ohmichi
Quoted 3 lines · Bernhard Walle
is there any documentation how the kdump compressed format (or the diskdump format, from what it is derived) looks like? Beside of the source code of the tools that support it. ;-)
The kdump compressed format is supported by only the crash utility and makedumpfile command. gdb does not support it. I think that there is not any documentation about the kdump compressed format, then I wrote it. Is it enough ?
Thanks a lot! Yes, that gives me the overview I needed.
I grabbed your information and generated a manual page from it where I also want to describe the other dump formats (when I have some time left):
Quoted 7 lines
http://www.suse.de/~bwalle/kdump/That's basically part of the SUSE kdump configuration, maintained in
http://freehg.org/u/bwalle/kdump/.I just used asciidoc because I hate nroff. I hope it's ok for you to distribute that manual page.
I have one question.
On the site (http://www.suse.de/~bwalle/kdump/vmcore.5.txt), the copyright of SUSE is written. If the part of kdump-compressed format is written to the README file of makedumpfile, is it the problem ?
Thanks
Ken'ichi Ohmichi
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 22 lines · Ken'ichi Ohmichi
Quoted 21 lines · Bernhard Walle
Quoted 8 lines · Ken'ichi Ohmichi
Quoted 3 lines · Bernhard Walle
is there any documentation how the kdump compressed format (or the diskdump format, from what it is derived) looks like? Beside of the source code of the tools that support it. ;-)
The kdump compressed format is supported by only the crash utility and makedumpfile command. gdb does not support it. I think that there is not any documentation about the kdump compressed format, then I wrote it. Is it enough ?
Thanks a lot! Yes, that gives me the overview I needed.
I grabbed your information and generated a manual page from it where I also want to describe the other dump formats (when I have some time left):
http://www.suse.de/~bwalle/kdump/That's basically part of the SUSE kdump configuration, maintained in
http://freehg.org/u/bwalle/kdump/.
Quoted 7 lines
Quoted 2 lines
I just used asciidoc because I hate nroff. I hope it's ok for you to distribute that manual page.
I have one question.
On the site (http://www.suse.de/~bwalle/kdump/vmcore.5.txt), the copyright of SUSE is written. If the part of kdump-compressed format is written to the README file of makedumpfile, is it the problem ?
No, of course not, I can also change the copyright there if you want.
Bernhard
Signature · 6 lines
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec