david
c19aa59021
> ‘monitoring/check_for_ubuntu_release.sh’ < ‘diskmon.lst.sample’ > ‘monitoring/diskmon.lst.sample’ < ‘diskmon.sh’ > ‘monitoring/diskmon.sh’ < ‘free.sh’ > ‘monitoring/free.sh’ < ‘get_uptime.sh’ > ‘monitoring/get_uptime.sh’ < ‘heartbeat.sh’ > ‘monitoring/heartbeat.sh’
15 lines
425 B
Bash
15 lines
425 B
Bash
#!/bin/bash
|
|
|
|
freememory=$(free -m | grep "cache:" | awk '{print $4}')
|
|
threshold="300"
|
|
|
|
|
|
if [ $freememory -gt $threshold ]; then
|
|
echo "There is $freememory MB availible. Threshold not reached."
|
|
else
|
|
echo "There is less than $threshold MB of memory availible."
|
|
/home/david/mail.sh "There is less than $threshold MB of memory availible!! You should probably do something about that pretty soon brother!!"
|
|
fi
|
|
|
|
exit 0
|