from small one page howto to huge articles all in one place
 

search text in:





Poll
Which screen resolution do you use?










poll results



Last additions:
Disable Anti-Aliasing fonts

Disable Anti-Aliasing fonts

words:

186

views:

8280

userrating:

no votes yet


May 25th. 2007:
Words

491

Views

9614

why adblockers are bad


handy one-liners for sed (Unix stream editor)
Tutorial:

handy one-liners for sed (Unix stream editor)

words:

4078

views:

25040

userrating:

no votes yet


rotating apache logfiles with cronolog

rotating apache logfiles with cronolog

words:

294

views:

9746

userrating:

no votes yet


Druckversion . pdf icon
You are here: System->Tips and Tricks

Magic SysRq Key

Linux is very stable, but sometimes a kernel panic could happen, sometimes this stops the X-server and you cant change to the console. What should be done? Hitting the reset button and risk filesystem integrity?

NO! There is a possibility to shut down the system cleanly or find out the source of the kernel panic.
For this purpose there is a kernel option called "Magic SysRQ Key" in the section kernel hacking.
If this option is enabled you can use a set of keyboard commands.

Alt+SysRq+r takes keyboard and mouse control from the X server. This can be useful if the X-Server crashed, you can change to a console and kill the X-Server or check the error log.

Alt+SysRQ+k kills all processes on the current terminal. Its a bad idea to do this on a console where X is running. The graphic will stop and you cant see what you type.

Alt+SysRQ+b is like a reset: a reboot without umounting or sync.

Alt+SysRQ+o shuts down via APM.

Alt+SysRQ+s writes all data from the disc cache to the harddiscs, its a sync.

Alt+SysRQ+u remounts all mounted filesystem readonly. After using this key, you can reboot the system with Alt+SysRQ+b without harming the system.

Alt+SysRQ+m prints memory information to the console.

Alt+SysRQ+e sends SIGTERM to all processes except init.

Alt+SysRQ+i sends SIGKILL to all processes except init.

Alt+SysRQ+l sends SIGKILL to all processes, inclusive init. (The system is not working after using this.)...

To shut down the system after a really bad kernel panic, do the following:
Alt+SysRQ+e (sends TERM-signal, processes can shutdown properly (e.g. save data))
Alt+SysRQ+u (a sync will be done when unmounting anyway)
Alt+SysRQ+i (for the processes that didn't listen for the TERM signal, this is a kill -9 process)
Alt+SysRQ+b (reboot).

To be able to use the SysRq feature, you need to do

echo "1" > /proc/sys/kernel/sysrq
or add an entry to /etc/sysctl.conf:
kernel.sysrq = 1

By the way, its a good idea to print this out and store near your PC, when it happens, you can't check back here...

Translated from http://www.pro-linux.de/news/2002/0019.html


rate this article:
current rating: average rating: 1.3 (6 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back
comment this article
Please read "Why adblockers are bad". Ärger mit Freenet.de



to the forum.
:
:
other Ads
Stellenangebote
Stellenangebote
für Fach- und
Führungskräfte
www.nachoben.com
Other free services
toURL.org
Shorten long
URLs to short
links like
http://tourl.org/2
tourl.org
.
FeedCollector
Combine various newsfeeds to one customized webpage
www.feedcollector.org
.
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
www.reversednslookup.org
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004 S&P Softwaredesign
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 10.1 ms
system status display