summaryrefslogtreecommitdiffstats
path: root/bin/statusbar
blob: 5d29e54f3504c56264feaffc1fe0d6260757161e (plain)
1
2
3
4
5
6
7
8
while true
do
	cpu=$(top -bn1 | grep load | awk '{printf "%.2f\n", $(NF-2)}')
	memory=$(free -m | awk 'NR==2{printf "%s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }')
	date=$(date +"%a %d/%m/%Y %H:%M")
	echo "CPU: $cpu% | MEM: $memory | $date"
	sleep 10
done