LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Blogs > thasuresh
User Name
Password

Notices

Rate this Entry

Purpose of “SysRq” button in our keyboard.

Posted 12-09-2010 at 02:19 PM by thasuresh

Hai friends,

When i started to use computer, From that day i had doubt with “PrtSc/SysRq” button. All of us knew the purpose of “PtrSc” button (i.e) “Print screen the current window “. But most of us don’t know the use of “SysRq” button. today i search in google about this, i got the answer. The small description os “Sysrq” button. ;-)

The main use of this button is,

Reboot machine when everything is hanging

<alt> + <print screen/sys rq> + <R> – <S> – <E> – <I> – <U> – <B>

If the machine is hanging and the only help would be the power button, this key-combination will help to reboot your machine (more or less) gracefully.

R – gives back control of the keyboard

S – issues a sync

E – sends all processes but init the term singal

I – sends all processes but init the kill signal

U – mounts all filesystem ro to prevent a fsck at reboot

B – reboots the system

Save your file before trying this out, this will reboot your machine without warning!

“Raising Elephants” mnemonic device

A common idiom to perform a safe reboot of a Linux computer which has otherwise locked up, the QWERTY(It’s a keyboard layout) (or AZERTY) mnemonic “Raising Elephants Is So Utterly Boring”, “Reboot Even If System Utterly Broken” or simply remembering the word “BUSIER” backwards, is often useful. It stands for

* unRaw (take control of keyboard back from X),
* tErminate (send SIGTERM to all processes, allowing them to terminate gracefully),
* kIll (send SIGKILL to all processes, forcing them to terminate immediately),
* Sync (flush data to disk),
* Unmount (remount all filesystems read-only),
* reBoot.

This can prevent a fsck being required on reboot and gives some programs a chance to save emergency backups of unsaved work.

In practice, each command may require a few seconds to complete, especially if feedback is unavailable from the screen due to a freeze or display corruption. For example, sending SIGKILL to processes which have not yet finished terminating can cause data loss.

In Linux distributions Enable SysRq key:

The SysRq key can be disabled with the following command:

$ echo 1 > /proc/sys/kernel/sysrq

To Disable:

$ echo 0 > /proc/sys/kernel/sysrq

Ex:

In terminal,

$ echo b > /proc/sysrq-trigger

Or

This is equivalent to the key combination Alt + SysRq + B which reboots the machine.

The feature is controlled both by a compile-time option in the kernel configuration, CONFIG_MAGIC_SYSRQ, and a sysctl kernel parameter,kernel.sysrq.

Source and more info:

http://en.wikipedia.org/wiki/Magic_SysRq_key

:-)
Posted in Uncategorized
Views 819 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 02:07 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration