Add CPU Usage info

This commit is contained in:
Mattia Basaglia 2016-04-22 19:33:28 +01:00
parent 7b4325a89b
commit e10ea10782
2 changed files with 5 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View file

@ -81,6 +81,11 @@ function ponyget_CPU()
cat /proc/cpuinfo | grep "model name" | head -n 1 | sed -r "s/model name\s: //"
}
function ponyget_CPU_Usage()
{
echo "$(top -b -n1 | grep "Cpu(s):" | sed -r -e "s/^[^0-9]+//" -e "s/[^0-9]+,\s+/ + /g" -e "s/[^0-9]+$//" | cut -d ' ' -f 1-5 | bc)%"
}
function ponyget_Uptime()
{
uptime | grep -oE "up.*user" | \