Hi Vivek and everyone, 2007/01/11 09:21:14 +0530, Vivek Goyal <[EMAIL PROTECTED]> wrote: >> I want to add the option of representing "create dumpfile from STDIN" >> clearly. >> I think the following commandline. >> >> * makedumpfile outputs a dump data of "flattening format (intermediate)" to >> STDOUT. >> # makedumpfile [-O | --to-stdout] /proc/vmcore >> >> * makedumpfile creates a normal dumpfile from STDIN of "flattening format". >> # makedumpfile [-I | --from-stdin] dumpfile >> > >If you want to create an explicit option for taking input from stdin, then >'-' might be a good choice. tar utility already uses it. > >So you should be able to use following. > ># makedumpfile -O -cd31 -x vmlinux /proc/vmcore | ssh [EMAIL PROTECTED] >"makedumpfile - dumpfile" > >or > >cat dumpfile.tmp > makedumpfile - dumpfile > >or > >makedumpfile - dumpfile < dumpfile.tmp
Thanks for your proposal.
Your proposal represents only "create dumpfile from stdin", but I want
to add option of representing not only "create dumpfile from stdin"
but also "re-arrange intermediate data to a normal dumpfile".
It was my mistake not to say "re-arrange intermediate data to a normal
dumpfile".
I considered what options are suitable for these functions, and I think
that '-F' and '-R' are good because these words represent each functions
clearly. The following is explanation of these options.
'-F' option:
'-F' means "Flatten dump data instead of lseek()".
For transporting dumpfile by SSH, there was one problem that lseek()
cannot affect to a remote host. Instead of lseek(), makedumpfile
outputs all dump data with a data header (fileoffset, data size).
I named this format "flattened format".
Analysis tools (crash, etc.) cannot read flattened format directly.
For analysis, dump data of flattened format should be re-arranged to
a normal dumpfile (readable by analysis tools) by '-R' option.
Both ELF dumpfile (-E) and kdump-compressed dumpfile (none/-c)
can be transported in flattened format.
With '-F' option, makedumpfile outputs dump data of flattened format
to a standard output. It is possible to transport dumpfile by SSH like
the following.
Example-1: Transporting ELF dumpfile in flattened format
# makedumpfile -F -E -d31 -x vmlinux /proc/vmcore | ssh [EMAIL PROTECTED]
"makedumpfile -R dumpfile"
Example-2: Transporting kdump-compressed dumpfile in flattened format
# makedumpfile -F -c -d31 -x vmlinux /proc/vmcore | ssh [EMAIL PROTECTED]
"makedumpfile -R dumpfile"
'-R' option:
'-R' means "Re-arrange dump data of flattened format to a normal
dumpfile". According to the above, analysis tools cannot read
flattened format. With '-R' option, makedumpfile re-arranges flattened
format from a standard input to a normal dumpfile.
Example-3: Transporting dump data of flattened format
# makedumpfile -F -E -d31 -x vmlinux /proc/vmcore | ssh [EMAIL PROTECTED]
"cat > dumpfile.tmp"
Analysis tools cannot read dumpfile.tmp of flattened format.
dumpfile.tmp should be re-arranged to a readable dumpfile by '-R'.
# makedumpfile -R dumpfile.elf < dumpfile.tmp
dumpfile.elf created by '-R' is ELF format. Analysis tools can read
dumpfile.elf. If specifing '-c' or none instead of '-E' for previous
makedumpfile, dumpfile created by '-R' is kdump-compressed format.
I tried creating the attached patch for SSH transporting.
In the attached patch, '-F' and '-R' are adopted.
This patch is for the latest makedumpfile (v.1.0.9).
https://sourceforge.net/projects/makedumpfile/
Please test it. Your opinions/comments are welcome.
Thanks
Ken'ichi Ohmichi
ssh_transport_20070119.patch
Description: Binary data
_______________________________________________ fastboot mailing list [email protected] https://lists.osdl.org/mailman/listinfo/fastboot
