Ok, so this is what i have and it will do for the time being
Code:
#!/bin/bash
INITIAL_RX=`cat /sys/class/net/eth0/device/net:eth0/statistics/rx_bytes`
sleep 10
FINAL_RX=`cat /sys/class/net/eth0/device/net:eth0/statistics/rx_bytes`
DELTA_RX=`expr $FINAL_RX - $INITIAL_RX`
KBPS_RX=`expr $DELTA_RX / 10240 `
let "RESULT = $KBPS_RX / 3"
echo $RESULT > "/sys/devices/platform/wdc-leds/leds:wdc-leds:fuel-gauge/brightness"
then to get it to run every 5 mins add this to the crontab (obv change the location of the script, but im lazy
*/5 * * * * /root/rate.bsh