Sun Microsystems, Inc.  Sun System Handbook - ISO 3.4 June 2011 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-71-1009392.1
Update Date:2010-12-15
Keywords:

Solution Type  Technical Instruction Sure

Solution  1009392.1 :   How To set and get Memory Dump with RHEL  


Related Items
  • Sun 3rd Party Software Product
  •  
  • Sun Fire V60x Server
  •  
  • Sun Fire V65x Server
  •  
  • Sun Fire V20z Server
  •  
  • Sun Fire V40z Server
  •  
Related Categories
  • GCS>Sun Microsystems>Servers>x64 Servers
  •  

PreviouslyPublishedAs
212987


Applies to:

Sun Fire V20z Server
Sun Fire V40z Server
Sun Fire V60x Server
Sun Fire V65x Server
Sun 3rd Party Software Product - Version: Not Applicable and later    [Release: N/A and later]
All Platforms

Goal

On Red Hat Enterprise Linux System, Memory Dump Log provides us the register, flags, memory information, and so on. So, it has effect to analyze the problems (especially memory problems). The following are examples of setting and getting Memory Dump using RHEL and V60x.

Solution

<< Setting Procedure of Memory Dump >>
[What we do from here]
1. Enable Magic Sysrq key
2. Set Serial Port on SP
3. Set and enable Serial Port on OS
0. Enable Console
In case it cannot check the current setting of 0-1,0-2, it means that the console
parameter is default value(default = enable), so it doesn't have to check.
0-1. Check the setting by "make menuconfig" , and edit as follows.
Character devices --->
[*] Virtual terminal
[*] Support for console on virtual terminal
<*> Standard/generic (8250/16550 and compatible UARTs) serial support
[*] Support for console on serial port
0-2. Check the setting of /usr/src/linux/.config, and edit as follows.
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
1. Enable Magic Sysrq key
?
1-1. Edit "kernel.sysrq" parameter (0 --> 1) in /etc/sysctl.conf file.
== Example =======================
# vi /etc/sysctl.conf
kernel.sysrq = 1
1-2. Make kernel.sysrq effective.
(covered with reboot oparation later, so possible to omit)
== Example =======================
# sysctl -p
2. Set Serial Port on SP
2-1. Check current output destination.
(Current value is set to SP Console)
== Example =======================
localhost $ platform get console
Rear Panel Enabled Speed Pruning Log Trigger
SP Console Yes 9600 No 244 KB
^^^^^^^^^^
2-2. Change the parameter "SP Console" to "Platform COMA".
== Example =======================
localhost $ platform set console -s platform
localhost $ platform get console
Rear Panel Enabled Speed Pruning Log Trigger
platform COMA Yes 9600 No 244 KB
^^^^^^^^^^^^^
3. Set and enable Serial Port on OS
3-1. Add new line to /etc/inittab
== Example =======================
# vi /etc/inittab
:
:
#Serial Port
s0:12345:respawn:/sbin/agetty -L 9600 ttyS0
--- About each argument ---
s0 : Make sure s0 is unique and doesn't overlap in inittab file.
12345 : run levels s0 start
respawn : restart process for the purpose of display
new login prompt when logout from console
3-2. Make the new line (s0) effective.
(covered with reboot operation later, so possible to omit)
== Example =======================
# telinit q
3-3. Set ttyS0 as Main Console by editting /etc/makedev.d file.
Type following.
== Example =======================
# cd /etc/makedev.d
# fgrep systty *
linux-2.4.x:l systty tty0
^^^^
?
# vi /etc/makedev.d/linux-2.4.x
l systty ttyS0
^^^^^
# cd /dev
# rm systty
# ./MAKEDEV systty
3-4. Setting grub(BootLoader).
(Edit /boot/grub/grub.conf file to enable to boot up via Serial Port)
* if system installed several types of Kernel, it is better to edit to
each kernel that has possibility to be used.
* Added parts are "console=tty0 console=ttyS0,9600n8" in sample.
== Sample =====================================================================
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1 -------> new line
terminal --timeout=10 serial console -------> new line
title Red Hat Linux (2.4.21-27.0.1.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-27.0.1.EL ro root=LABEL=/ console=tty0
console=ttyS0,9600n8console=tty0 console=ttyS0,9600n8console=tty0
console=ttyS0,9600n8console=tty0 console=ttyS0,9600n8console=tty0
console=ttyS0,9600n8
initrd /initrd-2.4.21-27.0.1.EL.img
title Red Hat Linux (2.4.20-20.9.XFS1.3.1)
root (hd0,0)
kernel /vmlinuz-2.4.20-20.9.XFS1.3.1 ro root=LABEL=/ console=tty0
console=ttyS0,9600n8
initrd /initrd-2.4.20-20.9.XFS1.3.1.img
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ console=tty0 console=ttyS0,9600n8
initrd /initrd-2.4.20-8.img???????
==============================================================================
3-5. Enable to login as root using ttyS0 by editing /etc/securetty file.
(If ttyS0 didn't found, add "ttyS0 as below")
== Example =======================
# vi /etc/securetty
tty0
tty1
ttyxx
:
ttyS0 <-- add
Now system settings are finished. It is possible to redirect to Serial Port
after GRUB phase.
** additional HW and other settings are left as below. **
0 Connect input/output device to Serial Port.
1 Reboot and push any key from input device(keyboard) connecting
to Serial Port when GRUB phase(Kernel choosing phase).
* You must push key before progressing to auto-boot phase.
(This operation enable not only normal display, but also
Serial Port side to output device.)
2 Choose the Kernel to boot up from Serial Port side of Input device.
<< Getting Procedure of Memory Dump >>
You can operate both input devices. Of course, it is possible to
do normal operation via normal input device and display.
You also can get memory dump logs on that time whenever you want.
The following commands are the way to get them.
* Memory dump logs are displayed to only Serial Port side of output device.
- Alt+SysRq+t --> listing up and dumping current task and info to console
- Alt+SysRq+p --> dumping current register and flag to console
- Alt+SysRq+m --> dumping current memory info to console


Product
Red Hat Enterprise Linux 3 x64
Red Hat Enterprise Linux
Sun Fire V40z Server
Sun Fire V20z Server
Sun Fire V65x Server
Sun Fire V60x Server

Memory, Dump, Linux, RHEL, analyze, Magic Sysrq key
Previously Published As
80468

Change History
Date: 2005-03-17
User Name: 31620
Action: Approved
Comment: Verified Metadata
Verified Keywords
Verified still correct for audience - free
Checked review date 2006-02-22
Checked for TM - none needed
Publishing
Version: 3
Date: 2005-03-14
User Name: 31620
Action: Accept
Comment:
Version: 0
Date: 2005-03-14
User Name: 93698
Action: Approved
Comment: reviewed
Version: 0
Product_uuid
89e881b6-4b81-11d8-99fc-080020a9ed93|Red Hat Enterprise Linux 3 x64
4d9ece9f-f938-48db-8d18-d8593c677214|Red Hat Enterprise Linux
4726b78d-56d2-11d8-9e3a-080020a9ed93|Sun Fire V40z Server
1acc55b3-4b82-11d8-99fc-080020a9ed93|Sun Fire V20z Server
079e9bbc-0ee3-11d7-8c50-f1061905b56f|Sun Fire V65x Server
03728cec-0ee3-11d7-9be8-dd41f651e0a3|Sun Fire V60x Server

Attachments
This solution has no attachment
  Copyright © 2011 Sun Microsystems, Inc.  All rights reserved.
 Feedback