code: plan9front

ref: 18bd1a92e5d8cb39e474bb3e4a1bd1d2a614a0dd
dir: /rc/bin/aanuke/

View raw version
#!/bin/rc
rfork e
for(i in `{psu | awk '/[ ]+aan$/ {print $2}'}){
	if(! grep -s -e '[ ]+\/net(\.alt)?\/tcp\/[0-9]+\/data$' /proc/$i/fd)
		echo '@{echo kill>/proc/'$i'/note} # aan (idle)'
}