1、簡單的使用范例:
# 立即重新啟動計算機 (Reboots the kernel without first unmounting file systems or syncing disks attached to the system)
echo "b" > /proc/sysrq-trigger
# 立即關閉計算機(shuts off the system)
echo "o" > /proc/sysrq-trigger
# 導出內存分配的信息 (可以用/var/log/message 查看)(Outputs memory statistics to the console)
echo "m" > /proc/sysrq-trigger
# 導出當前CPU寄存器信息和標志位的信息(Outputs all flags and registers to the console)
echo "p" > /proc/sysrq-trigger
# 導出線程狀態信息 (Outputs a list of processes to the console)
echo "t" > /proc/sysrq-trigger
# 故意讓系統崩潰 ( Crashes the system without first unmounting file systems or syncing disks attached to the system)
echo "c" > /proc/sysrq-trigger
# 立即重新掛載所有的文件系統 (Attempts to sync disks attached to the system)
echo "s" > /proc/sysrq-trigger
# 立即重新掛載所有的文件系統為只讀 (Attempts to unmount and remount all file systems as read-only)
echo "u" > /proc/sysrq-trigger
呵呵,此外還有兩個,類似於強制注銷的功能e — Kills all processes except init using SIGTERMi — Kills all processes except init using SIGKILL