# Memory (free shows everything)
free -h
free -m | awk 'NR==2 {printf "Mem: %d / %d MB (%.1f%%)\n", $3, $2, $3/$2*100}'
# CPU usage (instantaneous from /proc/stat)
top -bn1 | grep -E "^%Cpu" | awk '{print 100 - $8 "%"}'
# Or via mpstat:
mpstat 1 1 | awk '/Average:/ {print "CPU idle: " $NF "%"}'
# Load averages
uptime
cat /proc/loadavg # 0.42 0.55 0.61 1/123 4567
# All-in-one summary suitable for a banner / motd
echo "Mem: $(free -m | awk 'NR==2 {printf "%d/%d MB", $3, $2}') CPU load: $(awk '{print $1, $2, $3}' /proc/loadavg)"
Create a free account and build your private vault. Share publicly whenever you want.