aboutsummaryrefslogtreecommitdiff
path: root/config/ratpoison/panel/load
blob: 3977bee42b11846e73ccf2bf9c74326d8dace769 (plain)
1
2
3
4
5
6
7
#!/bin/bash
while true; do
cpu=`mpstat -P ALL 2 1 | grep "Average.*all" | awk '{print $3+$5}'` 
mem=`free | grep Mem | awk '{print $3/$2 * 100.0}'`
printf "C%.*f\n" 1 $cpu
printf "R%.*f\n" 0 $mem
done