SysRq
From Noah.org
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.
Some manufacturers, such as Lenovo, have removed the SysRq print from the PrtScn key. This key still works as a SysRq.
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.
Contents |
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
Notes
Note: Sometimes called SysReq and Sys Request.
loglevel(0-9) reBoot Crash terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) thaw-filesystems(J) saK show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount force-fb(V) show-blocked-tasks(W) dump-ftrace-buffer(Z)
