2008年12月15日 星期一

change log level & enable sysrq

echo 9 > /proc/sysrq-trigger

echo 1 >  /proc/sys/kernel/sysrq

alt + sysrq  +  p :  show cpu info

alt + sysrq  + t : show current task list

alt  + sysrq  + m : show memory info

redirect output from serial port

1. modify bios:
   (1)Change BIOS settings /Server/Serial Console Features/BIOS Redirection Port to
       [Serial port 1 or 2]
   (2)change direct to modem 

2.  modify /boot/grub/menu.lst for suse
     modify /boot/grub/grub.conf  for red hat
    console=ttyS0, 115200,vt100

3. modify /ect/inittab
    c0:2345:respawn:/sbin/agetty ttyS0 19200 vt100    

4. modify  /etc/securetty
    ttyS0

2008年12月9日 星期二

cpu info

cat /proc/cpuinfo

interrupt context

1. can not relinquish cpu by calling sleep functions

GFP_KERNEL

allocate memory:
1. GFP_KERNEL:
    kmalloc() is allowed to go to sleep and wait for pages to get freed up.

2.GFP_ATOMIC:
   Used by interrupt context code to get hold of memory. In this mode, kmalloc() is not allowed to    sleep-wait for free pages, so the probability of successful allocation with GFP_ATOMIC is lower    than with GFP_KERNEL.