Puppollo
8/4/2014 - 1:03 PM

get system performance CPU % Mem MB

get system performance CPU % Mem MB

top -bn1 | grep "KiB Mem:" | sed "s/.*, *\([0-9]*\)* used.*/\1/" | awk '{print $1/1024"MB"}'
top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1"%"}'