Difference between revisions of "SysRq"

From Noah.org
Jump to navigationJump to search
m (Created page with 'Category:Engineering [http://www.kernel.org/doc/Documentation/sysrq.txt Official SysRq Documentation] Sometimes the system seems flaky in responding to the Magic SysRq. I f…')
 
m
Line 2: Line 2:
  
 
[http://www.kernel.org/doc/Documentation/sysrq.txt Official SysRq Documentation]
 
[http://www.kernel.org/doc/Documentation/sysrq.txt Official SysRq Documentation]
 +
 +
There is a bit of a trick to using the '''Magic SysRq''' key sequence. The trick is to hold the '''Alt''' key during the entire process. Press '''Alt''' first; hold it; press the '''SysRq''' button; then press whatever key you want. Finally, you can release the '''Alt''' key.
  
Sometimes the system seems flaky in responding to the Magic SysRq. I found that if you learn to press the keys as described below then it is perfectly reliable. Think about it like this
+
Output will not go to an X terminal. It will be printed on the console. Press Ctrl-Alt-F1 to switch view to the console.
  
Press and hold the Alt key during the entire process. Just press it first; hold it in; and now don't worry about it. Now you just need to press two additional keys in sequence. Press-then-release the SysRq button; then press-then-release the command key. Finally, you can release the Alt key.
+
One some keyboards (especially Microsoft), you may find a key called '''F Lock'''. This is a stupid key. It's almost like they added a new CapsLock key except that there is no indicator to show that it is turned on. Often you need to press this once before you start. If you switch to a text console you may find that you cannot switch back to the X Window platform. Press '''F Lock''' once again to restore the function of the function keys.
 
 
Output will not go to an X terminal. It will be printed on the console. Press Ctrl=Alt-F1 to switch view to the console.
 
 
 
One some keyboards (especially Microsoft), you may find a key called "F Lock". This is a stupid key. It's almost like they added a new CapsLock key except that there is no indicator to show that it is turned on. Often you need to press this once before you start. If you switch to a text console you may find that you cannot switch back to the X Window platform. Press '''F Lock''' once again to restore the function of the function keys.
 
  
 
== SysRq output ==
 
== SysRq output ==

Revision as of 12:59, 26 November 2012


Official SysRq Documentation

There is a bit of a trick to using the Magic SysRq key sequence. The trick is to hold the Alt key during the entire process. Press Alt first; hold it; press the SysRq button; then press whatever key you want. Finally, you can release the Alt key.

Output will not go to an X terminal. It will be printed on the console. Press Ctrl-Alt-F1 to switch view to the console.

One some keyboards (especially Microsoft), you may find a key called F Lock. This is a stupid key. It's almost like they added a new CapsLock key except that there is no indicator to show that it is turned on. Often you need to press this once before you start. If you switch to a text console you may find that you cannot switch back to the X Window platform. Press F Lock once again to restore the function of the function keys.

SysRq output

The output of SysRq is logged to the console. If you have debugging set very low then you might not see anything. You can run `dmesg` to see the output or you can increase log visibility by using a SysRq command. Press the following keys to set log visibility to a high level

Alt SysRq 9

Send SysRq without keyboard

You can bypass the keyboard magic keys simply be writing the command code that want to execute to the following file:

echo h > /proc/sysrq-trigger

Enable / Disable SysRq

Enable, write a 1. To disable, write 0:

echo 1 > /proc/sys/kernel/sysrq

Freezing and unfreezing

Notes

Note: Sometimes called SysReq and Sys Request.