Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
BitBar and Argos-compatible shell script for getting system fan information over IPMI.
#!/usr/bin/env bash
output=`$IPMITOOL sdr type fan | $AWK '{if($5=="ok")print $9}'`
echo -n $output | $AWK 'BEGIN{RS=" ";k=0} {if($1>k)k=$1} END{print k"rpm"}'
echo "---"
echo -n $output | $AWK 'BEGIN{RS=" ";ORS="rpm\n"} {if($1>0)print}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.