We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8fb30e4 + c40fe92 commit e9b4044Copy full SHA for e9b4044
scripts/cpu.sh
@@ -0,0 +1,7 @@
1
+MAX=95
2
+[email protected]
3
+
4
+USE=`grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage ""}'`
5
+if [ $USE -gt $MAX ]; then
6
+ echo "Percent used: $USE" | mail -s "Running out of CPU power" $EMAIL
7
+fi
0 commit comments