Add more checl-scripts
This commit is contained in:
30
OLD/high_load_warning.sh
Normal file
30
OLD/high_load_warning.sh
Normal 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
|
||||
Reference in New Issue
Block a user