Add more checl-scripts

This commit is contained in:
2017-02-21 01:19:22 +01:00
parent ad7a77eb5a
commit a97dd2781e
12 changed files with 687 additions and 0 deletions

30
OLD/high_load_warning.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
fatal(){
echo ""
echo -e "Error: $*"
echo ""
echo -e "\tScript terminated.."
echo ""
exit 1
}
## - Number of processors
## -
declare -i number_processors=`grep -E "processor\s+:\s+" /proc/cpuinfo -c`
if [ -n "$number_processors" -o $number_processors -eq 0 ]; then
fatal 'Detecting number of prozessors failed!'
fi
if [ $number_processors -gt 8 ]; then
threshod_1_min=`echo "$number_processors / 2" | bc`
threshod_10_min=`echo "$number_processors / 3" | bc`
threshod_15_min=`echo "$number_processors / 3" | bc`
else
threshod_1_min=`echo "$number_processors"`
threshod_10_min=`echo "$number_processors /1.5"`
fi
threshod_15_min=$threshod_10_min