Zitat
Der Magic SysRQ-Key
Trotz dass Linux sehr stabil ist koennen Kernel-Panics in der Ausnahme auftreten, manchmal wird auch der X-Server gestoppt und man kann auf einmal gar nichts mehr tun, auch nicht die Konsolen wechseln. Was macht man in einem solchen Fall?
Man drueckt die Reset-Taste und riskiert dabei seinen ganzen Daten-Bestand?
FALSCH!
Es gibt eine Moeglichkeit das System, auch wenn es ganz und voellig zugerammelt ist, sauber herunterzufahren, oder auch noch die Ursache fuer das Problem herauszufinden. Fuer diesen Zweck gibt es im Kernel eine Option, sie ist in der Kathegorie "Kernelhacking" und heißt "Magic SysRQ key". Wenn diese Option mit in der Kernel einkompiliert wird, dann stehen Ihnen folgende Tastenkombinationen zur Verfügung: (auf älteren Tastaturen ist die Taste als "Print Screen" oder "S-Abf" bekannt, im Deutschen mehr als "Druck"-Taste).
Mit
Alt+SysRQ+r nehmen Sie dem X-Server die Kontrolle über Maus&Tastatur weg. Das kann nützlich sein um bei einem gecrashten X-Server auf eine andere Konsole zu wechseln und den X-Server zu killen oder seine Fehlermeldungen zu sehen.
Alt+SysRQ+k killt alle Prozesse auf dem Aktuellen Terminal. Dies ist ungünstig auf Terminals zu verwenden, auf denen ein X läuft,da die Graphik stehen bleibt und Sie nicht sehen werden, was Sie tippen.
Alt+SysRQ+b kommt eine Reset gleich: Ein Neustart ohne umounten oder syncen. Bei
Alt+SysRQ+o wird das System über APM nieder gemacht.
Alt+SysRQ+s schreibt die Daten aus dem Disk-Cache von Linux (auch als Block-Device-Buffer bekannt) auf die Festplatte, es wird ein Sync durchgeführt.
Alt+SysRQ+u umountet alle gemounteten Dateisysteme readonly. Nachdem Sie diesen Keybenutzt haben, können Sie ihr System mit
Alt+SysRQ+b ohne Schaden rebooten.
Alt+SysRQ+m gibt Infos über den Speicher auf der Console aus.
Alt+SysRQ+e sendet SIGTERM zu allen Prozessen außer INIT.
Alt+SysRQ+i sendet SIGKILL zu allen Prozessen, außer Init.
Alt+SysRQ+l sendet SIGKILL zu allen Prozessen, inclusive Init. (Ihr System ist danach nicht mehr funktionsfähig)... Um also ihren Rechner nach einem richtigen Festrammler noch sauber herunterbringen müssen Sie folgendes tun:
Alt+SysRQ+e (sendet TERM-Signal, Prozesse können sich noch ordnungsgemäß beenden (zB Daten speichern))
Alt+SysRQ+u (sync wird beim Umount eh' gemacht)
Alt+SysRQ+i (für die Prozesse, die auf TERM nicht hören gibt es halt ein KILL (kommt einem kill -9 prozess gleich)
Alt+SysRQ+b (reboot).
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
$ cat /usr/src/linux/Documentation/sysrq.txt
...
'b' - Will immediately reboot the system without syncing or unmounting
your disks.
'c' - Will perform a kexec reboot in order to take a crashdump.
'd' - Shows all locks that are held.
'e' - Send a SIGTERM to all processes, except for init.
'f' - Will call oom_kill to kill a memory hog process.
'g' - Used by kgdb on ppc and sh platforms.
'h' - Will display help (actually any other key than those listed
here will display help. but 'h' is easy to remember :-)
'i' - Send a SIGKILL to all processes, except for init.
'k' - Secure Access Key (SAK) Kills all programs on the current virtual
console. NOTE: See important comments below in SAK section.
'm' - Will dump current memory info to your console.
'n' - Used to make RT tasks nice-able
'o' - Will shut your system off (if configured and supported).
'p' - Will dump the current registers and flags to your console.
'q' - Will dump a list of all running timers.
'r' - Turns off keyboard raw mode and sets it to XLATE.
's' - Will attempt to sync all mounted filesystems.
't' - Will dump a list of current tasks and their information to your
console.
'u' - Will attempt to remount all mounted filesystems read-only.
'v' - Dumps Voyager SMP processor info to your console.
'w' - Dumps tasks that are in uninterruptable (blocked) state.
'x' - Used by xmon interface on ppc/powerpc platforms.
'0'-'9' - Sets the console log level, controlling which kernel messages
will be printed to your console. ('0', for example would make
it so that only emergency messages like PANICs or OOPSes would
make it to your console.)
...
|
Hab ich irgendwo mal rauskopiert. Wenn jemand die Quelle findet, dann darf er sie nennen.
Datenbanken Geforce-MX-4000 Anwendungen Externe Geräte Rezepte Flohmarkttermine Forumskonventionen Lob & Kritik Kontaktanzeigen Stadtpläne Suchfunktion Neueste Mitglieder Emerge Probleme Online Preise vergleichen Tutorials,Tipps & Tricks imbisswagen Spiele Drucker Winterurlaub Andere Architekturen Arthrose Installation WLAN Probleme Linux-Onlineshop