8 rsysrq - Send SysRQ commands remotely over the network
20 # t(E)rminate-all-tasks
21 # memory-(F)ull-oom-kill
24 # secure-attention-(K)ey
25 # show-backtrace-a(L)l-active-cpus
36 # show-blocked-tasks(W)
37 # dump-ftrace-buffer(Z)
42 echo "Usage: $0 host[:port] sysrq-keys sysrq-password"
46 expr "$1" : '.*:' >/dev
/null
&& hostport
=$1 || hostport
=$1:9
49 ipaddr
=`gethostip -d ${hostport%:*}`
53 salt
=`dd bs=12 count=1 if=/dev/urandom 2>/dev/null | openssl enc -base64`
54 data
=$keys,$seqno,$salt
55 data
=$data,`echo -n "$data,$ipaddr,$password" | sha1sum | cut -c1-40`
58 echo "$data" | socat stdin udp-sendto
:$hostport