sysrqd is a tiny daemon aiming to control sysrq over network.SysRq stands for System Request, and this are functions mapped to keyboard shortcuts by the kernel. You can use them by pressing Alt+SysRq+[key] (SysRq might be named “Print Screen” on your keyboard),Permits to execute usual SysRq commands by network, like: sync, umount, reboot, poweroff, sak, term, etc. where key can be s (sync), k (sak), 0 to 9 (logging level), b (reboot), etc.
The goal of this keyboard sequences is too be available even if you can’t do anything on your box, because you screwed up everything, or because it’s crashed or under very heavy load.
sysrqd can help you to use SysRq keys when you are not in front of your box,and you need to do Emergency Sync, R/O remount and reBoot.
It is designed to respond under heavy load or half-crashed box, so it might work even if you can’t access to your box for example. In this case, you will be happy to telnet to your box on sysrqd port, enter your password, and then press s, u, b and wait for your server to reboot. You would not have been able to do that since ssh was not responding.
The connection is password protected but not cyphered so you might want to firewall it or to run it on a trusted network.
Install sysrqd in Debian
#apt-get install sysrqd
Install sysrqd in Ubuntu
sudo apt-get install sysrqd
This will complete the installation
To set up your password use the following command
echo "mypassword" > /etc/sysrqd.secret
sudo chmod 0600 /etc/sysrqd.secret
Then, you will be able to telnet to port 4094/tcp.
% telnet localhost 4094
Connected to localhost.localdomain.
Escape character is ‘^]'.
sysrqd password: hello