Created
April 24, 2017 22:58
-
-
Save kolunar/11ce88d115b9bbf5259e2796b7032579 to your computer and use it in GitHub Desktop.
Monitoring Resources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Command to display Memory usage, Disk Usage and CPU Load | |
======================================================== | |
free -m | awk 'NR==2{printf "Memory Usage: %s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }' | |
df -h | awk '$NF=="/"{printf "Disk Usage: %d/%dGB (%s)\n", $3,$2,$5}' | |
top -bn1 | grep load | awk '{printf "CPU Load: %.2f\n", $(NF-2)}' | |
# should also try monit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment