Tuesday, October 28, 2008

Gebruiksaanwijzing Galanz Oven

Linux Kernel Magic SysRq key "Magic" for Crash Recovery

• What are the "magic key sysqr? can be defined as a combination of "magic" key that allows you to interact directly with the kernel beyond any operation is making, unless the same is not lock. Usually they are used mainly for debugging!
• What can I serve? For have much information and as we shall see in use them to our advantage in case of problems.

• How do I get these Magic Key on my Linux box?
Easy, if you use the default kernel should already have the option included in, if you recompile you will need to enter.

For safety you should check the config for your running kernel: $ egrep-i
sysrq / boot/config- $ (uname-r) = y CONFIG_MAGIC_SYSRQ

If the answer is positive as in this example, you are a horse!

For those who like to compile your kernel, remember that the entry for "sysrq key is located under" Kernel hacking "

subsequent inspection must be done on the file" / proc / sys / kernel / sysrq " , where the resulting number that we will understand what is enabled or not:
Possible results:

0 - Completely disabled
1 - Enable all functions of sysrq
> 1 - the number you enable certain features (continued listing description) :
2 - enable control of console logging level
4 - enable control of keyboard (SAK, unraw)
8 - enable debugging dumps of processes etc..
16 - enable sync command
32 - enable remount read-only
64 - enable signaling of processes (term, kill, oom-kill)
128 - allow reboot / poweroff
256 - allow nicing of RT tasks to perform

Well control:
$ cat / proc / sys / kernel / sysrq
1

If instead we want to enable or disable certain options just run as root: # echo
"number"> / proc / sys / kernel / sysrq

Where number can take values \u200b\u200bin the table or the sum of the same if we want to enable multiple options simultaneously.

perfect passive action, magical combinations that we can use are as follows: Alt + Print Screen +

LETTER (replace with one of the following)

b - Reboot your system without having to remove or make syncing the disks.
c - a restart of kexec to take a crashdump.
d - Shows all blocks. And
- Send to all processes except those of an init SIGTERM
f - Kill the process more expensive memory
g - Use kgdb on ppc platforms and
sh h - Displays help (really help is displayed using all of the keys on the list, but use the h because it is much easier to remember) the
- Send to all processes except init a SIGKILL
k - Secure Access Key (SAK) Uccide tutti i programmi sulla console virtuale corrente.
NOTA: Leggete i commenti importantissimi nella sezione SAK.
m - Visualizza informazioni della memoria .
n - Used to make RT tasks nice-able
o - Eseguie uno Shut Down del sistema (se configurato e supportato).
p - Visualizza i registri e flags correnti.
q - Mostra la lista di tutti i timers avviati.
r - setta la tastiera in XLATE.
s - Esegue un sync di tutti i filesystem montati.
t - Mostra tutti i processi.
u - Rimonta tutti filesystems in sola lettura.
v - Mostra informazioni su processori Voyager SMP.
w - Visualizza tutti i tasks bloccati.
x - Usato dall’interfaccia xmon su piattaforme ppc / powerpc.
0-9 - sets the level of loging the console will show the kernel messages on the console. (0 for example, makes sure to show only emergency messages like Panics or OOPSes)

still refer to the official documentation in English, which installed the kernel source and reading the file:
Documentation / sysrq.txt

At this point, suppose you're in the midst of a freeze of the graphical server, everything seems blocked, perhaps unable to make the switch on ttyN, maybe you can not even see the writing etc etc. Well before you press the reset button try to enter these keystrokes:

(pointing you to what I do in these cases, but are welcome advice on the best method to use accordingly)

I try to properly terminate processes except those INIT:
+ Alt + Print Screen and

After a few seconds (average 5 / 6 to allow the combination of the previous end processes correctly) will kill the rest of the processes, always except those INIT:
Alt + Print Screen + i

I do a sync of discs:
Alt + Print Screen + s

replaceable only filesystems reading (very important after the sync)
Alt + Print Screen + u

Reboot the system:
Alt + Print Screen + b

fun ... Now



0 comments:

Post a Comment