Hello community, here is the log from the commit of package kexec-tools checked in at Sun May 7 16:22:03 CEST 2006. -------- --- kexec-tools/kexec-tools.changes 2006-04-28 21:09:19.000000000 +0200 +++ STABLE/kexec-tools/kexec-tools.changes 2006-05-02 16:19:52.000000000 +0200 @@ -1,0 +2,8 @@ +Tue May 2 16:18:57 CEST 2006 - tiwai@suse.de + +- update/improve README.SUSE +- fix the default value in sysconfig.kdump +- add elevator=deadline to the boot parameter of kdump kernel + to save memory footprint (#170591) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kexec-tools.spec ++++++ --- /var/tmp/diff_new_pack.7RDByo/_old 2006-05-07 16:20:56.000000000 +0200 +++ /var/tmp/diff_new_pack.7RDByo/_new 2006-05-07 16:20:56.000000000 +0200 @@ -17,7 +17,7 @@ Autoreqprov: on Summary: Tools for fast kernel loading Version: 1.101 -Release: 28 +Release: 31 Source: %{name}-%{version}.tar.bz2 Source1: kdump Source2: sysconfig.kdump @@ -113,6 +113,11 @@ /var/adm/fillup-templates/sysconfig.kdump %changelog -n kexec-tools +* Tue May 02 2006 - tiwai@suse.de +- update/improve README.SUSE +- fix the default value in sysconfig.kdump +- add elevator=deadline to the boot parameter of kdump kernel + to save memory footprint (#170591) * Fri Apr 28 2006 - olh@suse.de - use df -P to print all data for a mount point in a single line long device node names will cause 2 lines in df output ++++++ README.SUSE ++++++ --- kexec-tools/README.SUSE 2006-02-22 17:02:40.000000000 +0100 +++ STABLE/kexec-tools/README.SUSE 2006-05-02 16:14:32.000000000 +0200 @@ -1,165 +1,265 @@ -SETUP OF KDUMP ON SLES10 -======================== +Kdump README for SLES 10 -For enabling the crash dump, you need to add a boot option to specify -the size and offset of the crash kernel system, for example, -"crashkernel=64M@16M". The 64M denotes the reserved space for the -kdump kernel and 16M is the address of the reserved area. See -/usr/src/linux/Documentation/kdump/kdump.txt for details. -You can add this either via YaST bootloader module, or by manually -editing the boot loader configuration (e.g. /boot/grub/menu.lst). - -Then, activate kdump init script, which is deactivated as default. -Use YaST System/System Services (Runlevel) module, or run manually - - # /sbin/chkconfig kdump on - -After this is finished, reboot the system once so that the kdump -kernel image is loaded properly. - -When a crash happens, the kernel crash handler restarts the second -"capture" kernel formerly loaded via kdump init script, and reboots -the system using the reserved memory to the runlevel $KDUMP_RUNLEVEL. -During this second boot, (the same) kdump init script is invoked -again, but this time it dumps the old memory image for later -analysis. - -When the crash happens in the graphical environment, you'll likely -have no visiblity in the second kernel boot. (If you used VGA -console, you may have still visual output from the secondary kernel, -though.) Thus, the default behavior of kdump script is to save the -old vmcore image and then reboot the system immediately again. You -can adjust the detailed behavior of kdump script via sysconfig -variables described later. - - -DETAIL OF DEFAULT DUMPER -======================== - -As default, kdump script saves the vmcore file to a unique -sub-directory consisting of $KDUMP_SAVEDIR and the date string, such -as /var/log/dump/2006-02-21-13:20/vmcore. +Prerequisites +============= + +Be sure that you have installed the kexec-tools rpm and the kernel_kdump +rpm. The version of the kernel_kdump rpm must match the version of the +running system kernel. + + +Overview +======== + +Kdump uses kexec to quickly boot to a recovery kernel whenever a dump of +the system kernel's memory needs to be taken (for example, when the +system panics). The system memory image is preserved across the reboot +and is accessible to the debug kernel. You can use common Linux +commands, such as cp and scp, to copy the memory image to a dump file on +the local host, or across the network to a remote system. + +Kdump and kexec are currently supported on the x86, x86_64, and PPC64 +architectures. + +The system kernel reserves a small section of memory for the capture +kernel at boot time of the system kernel. This ensures that ongoing +Direct Memory Access (DMA) from the system kernel does not corrupt the +capture kernel. The "kexec -p" command loads the capture kernel into +this reserved memory area. + +On x86 machines, the first 640 KB of physical memory is needed to boot, +irrespective of where the kernel loads. Therefore, kexec preserves this +region immediately before rebooting into the recovery kernel. + +All of the necessary information about the system kernel's core image is +encoded in the ELF format, and stored in a reserved area of memory +before a crash. The physical address of the start of the ELF header is +passed to the recovery kernel through the "elfcorehdr=" boot parameter. + +In the capture kernel, you can access the memory image from the system +kernel in two ways: + +1) Through a /dev/oldmem device interface. A capture utility can read the +device file and write out the memory in raw format. This is a raw dump +of memory. Analysis and capture tools must be intelligent enough to +determine where to look for the right information. + +2) Through /proc/vmcore. This exports the memory dump as an ELF format +file that can be written out using any file copy command such as cp or +scp. Further, you can use analysis tools such as the GNU Debugger (GDB) +or Crash to debug the dump file. This method ensures that the dump pages +are ordered correctly. + + +Setup of Kdump on SLES 10 +========================= + +Be sure the prerequisite RPMs are installed. + +To enable a crash dump, you need to add an option to the boot loader to +specify the size and offset of the recovery kernel memory area. + +An example of this boot loader option is "crashkernel=64M@16M". The 64M +shows the reserved space for the Kdump recovery kernel, and the 16M is +the address of the reserved area. + +You can add this option either with the YaST boot loader module, or by +manually editing the boot loader configuration file. + +The recommended values by architecture for the "crashkernel" option are: + +i386: crashkernel=64M@16M +x86_64: crashkernel=64M@16M +PPC64: crashkernel=128M@32M + +After setting the boot loader option, activate the Kdump init script, +which is not activated by default. To do this, use the YaST System +Services (Runlevel) module. Alternately, enable the service on the +command line with the following command: "/sbin/chkconfig kdump on". + +After enabling the Kdump init script, reboot the system so that the +Kdump kernel image is loaded properly. + +Test your Kdump setup by issuing the following commands as the root +user: + +***Warning*** This procedure will crash your system. Shut down all +applications and ensure that no users are logged on before performing +this test. + +# sync +# echo c > /proc/sysrq-trigger + +After the system recovers, verify that a vmcore file was generated in +the save dump directory. By default the vmcore file is located in +/var/log/dumps/<date-string>. + +When a crash occurs, the kernel crash handler starts the second recovery +kernel that the Kdump init script loaded earlier, and reboots the system +using the reserved memory up to the $KDUMP_RUNLEVEL runlevel. + +During the boot of the recovery kernel, the Kdump init script loads +again, but this time it dumps the core image for later analysis. + +When a crash happens in a graphical environment, you will likely have no +GUI in the second kernel boot. If you used a VGA console, you might +still have visual output from the secondary kernel. The default behavior +of the Kdump script is to save the old vmcore image, and then reboot the +system immediately. You can adjust the behavior of the Kdump script +through sysconfig variables described later in this document. + + +The Default Dumper +================== + +By default, the Kdump script saves the vmcore file to a unique +sub-directory consisting of $KDUMP_SAVEDIR and the date string, such as +/var/log/dump/2006-02-21-13:20/vmcore. Before copying the vmcore file, the default dumper does some system -checks. First, it checks the number of old dump directories and -removes if it exceeds the number given as $KDUMP_KEEP_OLD_DUMPS. At -next, the free disk space on the partition of the dump directory is -checked. If the free space is less than the sum of the memory size -and the value given as $KDUMP_FREE_DISK_SIZE, no dump will be done. - -The runlevel of the second boot is specified by $KDUMP_RUNLEVEL. -When $KDUMP_IMMEDIATE_REBOOT is "yes", the init script automatically -reboots after saving the vmcore. As default, KDUMP_RUNLEVEL=1 and -KDUMP_IMMEDIATE_REBOOT=yes are used in order to reduce possible risks -of brokenness in the capture kernel environment. - -If you would like more complex jobs than the default dumper, pass -the appropriate command or script to $KDUMP_TRANSFER, and change -$KDUMP_RUNLEVEL and $KDUMP_IMMEDIATE_REBOOT. For example, setting - KDUMP_TRANSFER="scp /proc/vmcore remote:/dump" -and KDUMP_RUNLEVEL=3 will make kdump acting like a netdump. You can -set KDUMP_IMMEDIATE_REBOOT=no to prevent the immediate reboot, for -example, to check the system over network, too. +checks. First, it checks the number of old dump directories and removes +them if there are more than $KDUMP_KEEP_OLD_DUMPS. Then, the dumper +checks the free disk space in the partition of the dump directory. If +the free space is less than the sum of the memory size and the value +given in $KDUMP_FREE_DISK_SIZE, then the dumper will not create a dump. + +$KDUMP_RUNLEVEL specifies the runlevel of the Kdump (recovery) kernel +boot. When $KDUMP_IMMEDIATE_REBOOT is set to yes, then the init script +automatically reboots after saving the vmcore. By default, the dumper +uses KDUMP_RUNLEVEL=1 and KDUMP_IMMEDIATE_REBOOT=yes, in order to reduce +the possible risk of disk corruption in the recovery kernel environment. + +If you want Kdump to run more complex jobs than set by the default +dumper configuration, set the name of the appropriate command or script +to be run via $KDUMP_TRANSFER, and change $KDUMP_RUNLEVEL and +$KDUMP_IMMEDIATE_REBOOT. + +For example, setting $KDUMP_TRANSFER="scp /proc/vmcore remote:/dump" and +KDUMP_RUNLEVEL=3 will make Kdump act like a netdump. You can set +KDUMP_IMMEDIATE_REBOOT=no to prevent the immediate reboot. This could be +useful to check the system over the network, for example. -Note that the available memory size for the second kernel is limited, -hence KDUMP_RUNLEVEL=5 (graphical login) is usually not recommended. +Note that the available memory size for the recovery kernel is limited. +Setting KDUMP_RUNLEVEL=5 (graphical login) is not recommended. -TUNING PARAMETERS +Tuning parameters ================= -The basic behavior of kdump init script can be adjusted via -/etc/sysconfig/kdump. Edit the following values via YaST rc editor -or manually edit /etc/sysconfig/kdump file (and restart kdump service -if necessary). +You can adjust the basic behavior of the Kdump script by editing the +/etc/sysconfig/kdump file. Edit the script values with the YaST runlevel +System Services editor, or manually edit the /etc/sysconfig/kdump file, +and then restart the kdump service. -* GENERIC OPTIONS - - KDUMP_KERNELVER +Generic options +--------------- - The kernel version string for the kdump kernel, such as - 2.6.16-5-kdump. The init script will use a kernel named - /boot/vmlinux-$KDUMP_KERNELVER - If no version is specified, then the init script will try to find - a kdump kernel with the same version number as the running - kernel. Using "kdump" will default to the most recently installed - kdump kernel. +- KDUMP_KERNELVER - - KDUMP_COMMANDLINE +This is the kernel version string for the Kdump kernel; an example is +"2.6.16-5-kdump". The init script will use a kernel named +/boot/vmlinux-$KDUMP_KERNELVER. The kdump script is located in the +/etc/sysconfig file. - The kdump commandline is the command line that needs to be passed - off to the kdump kernel. This will likely match the contents of - the grub kernel - line. For example: - KDUMP_COMMANDLINE="ro root=LABEL=/" - If a command line is not specified, the default will be taken from - /proc/cmdline. +If you do not specify a version, then the init script will try to find a +Kdump kernel with the same version number as the running kernel. Using +the string "kdump" will default to the most recently installed Kdump +kernel. - - KEXEC_OPTIONS - Additional arguments passed to kexec. For example, to generate - ELF32 dump on x86-64 to allow i386 systems to read dump, set - "--elf32-core-headers" here. - Keep this empty in most cases. +- KDUMP_COMMANDLINE - - KDUMP_RUNLEVEL +This sets the command string to be passed to the Kdump kernel. This will +usually match the contents of the grub kernel line. An example is +KDUMP_COMMANDLINE="ro root=LABEL=/". - The run-level to boot the kdump kernel. The default is "1". - If you need networks in the kdump environment, set "3". +If you do not give a command line, then the default will be taken from +/proc/cmdline. - - KDUMP_IMMEDIATE_REBOOT - Specifies whether immediately to reboot after saving the core in - the kdump kernel. Default is "yes". +- KEXEC_OPTIONS - - KDUMP_TRANSFER +You can use this to pass additional arguments to kexec. For i386 and +x86-64, you likely need to pass "--args-linux" here. - A script or command executed to process/transfer the dump image. - It can read the dump image either via /proc/vmcore or /dev/oldmem. - Keeping this empty will use the default dumper. -* OPTIONS FOR DEFAULT DUMPER +- KDUMP-RUNLEVEL - - KDUMP_SAVEDIR +This is the runlevel that the Kdump kernel boots to. The default is "1". +To enable network support in the Kdump recovery environment, set this to +"3". - Directory path where the dumps are saved in. - The default is "/var/log/dump". - - KDUMP_KEEP_OLD_DUMPS +- KDUMP_IMMEDIATE_REBOOT - Specifies how many old dumps are kept. If the number of dump - files exceeds this number, older dumps are removed. - You can prevent the automatic removal by setting zero to this. - The default value is 5. +This option specifies whether to reboot immediately after saving the +core in the Kdump kernel. The default is "yes." - - KDUMP_FREE_DISK_SIZE - Specifies the minimal free disk space (in MB unit) on the dump - partition. If the free disk space is less than the sum of this - value and memory size, the default dumper won't save vmcore file - in order to keep the system sane. Setting zero forces to dump - without check. - The default value is 64MB. +- KDUMP_TRANSFER +This is an option to execute a script or command to process or transfer +the dump image. It can read the dump image either through /proc/vmcore +or /dev/oldmem. An empty string will use the default dumper. + + +Options for the Default Dumper +------------------------------ + +- KDUMP_SAVEDIR + +This option specifies the path to the directory where the dumps are +saved. The default is "/var/log/dump". + + +- KDUMP_KEEP_OLD_DUMPS + +This option specifies how many previous dumps are kept. If the number of +saved dump files exceeds this number, the dumper removes older dumps. +You can prevent automatic removal by setting this to "0" (zero). The +default value is "5". + + +- KDUMP_FREE_DISK_SIZE + +This specifies the minimum free disk space in megabytes of the dump +partition. If the free disk space is less than the sum of this value and +the memory size, then the default dumper will not save the vmcore file +in order to prevent disk corruption. Setting this option to "0" (zero) +forces the dumper to dump without checking the size. The default value +is "64". + + +Dump Analysis +------------- + +Dump analysis can be performed using GDB or the Crash utility. The Crash +utility is included in the crash RPM package. You must install a +debug-info kernel matching the version of the system kernel (of the +system where the dump was collected) on the system where the analysis is +to be performed. The debug-info kernel provides symbol and type +information that Crash and GDB use. You can find kernel debug +information RPMs on the SUSE support Web site. Alternately, you can +build a debug-info kernel from source by specifying the +CONFIG_DEBUG_INFO kernel parameter. -GDB HELPER SCRIPT -================= -The gdb-kdump script is provided for easy use of gdb with dump -images. The usage is simple: +GDB Helper Script +----------------- - % gdb-kdump [vmcore] +The GDB-kdump script is provided to simplify use of GDB on dump images. +The usage is "gdb-kdump [vmcore]". -The argument is the vmcore dump image to analyze. If no argument is -given, the very latest dump image will be taken. +The argument is the vmcore dump image to analyze. If you do not give an +argument, then the latest dump image will be taken. The script starts +GDB with the vmlinux of the currently running kernel. The script assumes +that the vmlinux file is at /boot/vmlinux-$kernel. If the script finds +only a gzip-compressed file, the file is automatically uncompressed. -The script starts gdb with vmlinux of the currently running kernel. -It assumes that the vmlinux is found as /boot/vmlinux-$kernel. If -only gz-compressed file is found, it uncompresses automatically. -Note that you'll need kernel-*-debuginfo with debug symbols for -reasonable analysis. - -gdb-kdump also reads some useful macros for kdump image (originally -provided in /usr/src/linux/Documentation/kdump) at start up. The -following macros become available: bttnobp, btt, btpid, trapinfo, -dmesg. See the help of each command in gdb for details. +Note that you will need to supply kernel-versionnumber-debuginfo, with +debug symbols. GDB-kdump also reads some useful macros for the Kdump +image, originally provided in /usr/src/linux/Documentation/kdump, at +startup. The following macros then become available: bttnobp, btt, +btpid, trapinfo, and dmesg. See the help topic of each command in GDB +for details. ++++++ kdump ++++++ --- kexec-tools/kdump 2006-04-28 21:07:07.000000000 +0200 +++ STABLE/kexec-tools/kdump 2006-05-02 16:18:42.000000000 +0200 @@ -133,6 +133,8 @@ if [ -z "$KDUMP_COMMANDLINE" ]; then KDUMP_COMMANDLINE=`cat /proc/cmdline` KDUMP_COMMANDLINE=`echo $KDUMP_COMMANDLINE | sed -e 's/crashkernel=[0-9]\+M@[0-9]\+M//g'` + # Use deadline for saving the memory footprint + KDUMP_COMMANDLINE="$KDUMP_COMMANDLINE elevator=deadline" fi if [ -n "$KDUMP_RUNLEVEL" ]; then case "$KDUMP_RUNLEVEL" in ++++++ sysconfig.kdump ++++++ --- kexec-tools/sysconfig.kdump 2006-03-08 23:11:33.000000000 +0100 +++ STABLE/kexec-tools/sysconfig.kdump 2006-05-02 16:15:16.000000000 +0200 @@ -75,7 +75,7 @@ KDUMP_SAVEDIR="/var/log/dump" ## Type: integer -## Default: 10 +## Default: 5 # # Specifies how many old dumps are kept. If the number of dump files # exceeds this number, older dumps are removed. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de