#!/bin/sh # Display CPU usage percentage grep 'cpu ' /proc/stat | awk '{ usage=($2+$4)*100/($2+$4+$5) printf "CPU %.0f%%", usage }'