script nya :
bikin file ram.sh
#!/bin/bash
[ `free -m | grep Mem | awk ‘{print $3}’` -ge 14000 ] && free -m | grep Mem | awk ‘{print “RAM usage: “$3” of “$2}’ | mail -S smtp=175.176.161.163 -r admin@localhost.com -s “memory report” yuby@yubyml.com
ket : jadi jika RAM used sudah sampai 14 GB maka akan ada alert email ke yuby@yubyml.com
bikin cron nya
* * * * * /home/ram.sh
(Visited 290 times, 1 visits today)