Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias cpu='read cpu a b c previdle rest < /proc/stat; prevtotal=$((a+b+c+previdle)); sleep 1; read cpu a b c idle rest < /proc/stat; total=$((a+b+c+idle)); CPU=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal))); echo -n "CPU Usage : "$CPU"% "; CPU_MHZ=$(lscpu | grep "CPU MHz"| cut -d" " -f19 | cut -d"." -f1); echo "("$CPU_MHZ"MHz)"'
- alias disk='df -h | awk '\''$NF=="/"{printf "Disk Usage : %d/%dGB (%s)\n", $3,$2,$5 }'\'''
- alias mem='free -m | awk '\''NR==2{printf "Memory Usage: %s/%sMB (%.f%)\n", $3,$2,$3*100/$2 }'\'''
- alias sys='cpu; mem; disk'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement