previous one wasnt accurate

parent e07d4803
#!/bin/sh
CPU_USAGE=`grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage}'`
CPU_USAGE=`top -bn 1 | awk 'NR>7{s+=$9} END {print s}'`
echo "CPU USAGE: $CPU_USAGE"
python /home/ubuntu/scale.py $CPU_USAGE
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment