Tuesday, 28 January 2014

Load Monitoring script


#!/bin/bash
tech=$(cat /proc/loadavg | awk '{print $1}' | awk -F. '{print $1}')
if [ $tech -ge 50 ]
then
/bin/ps -ef | mail -s "imediatube server PROCESS report" aztest@gmail.com
/usr/bin/tail -n50 /var/log/{messages,dmesg} | mail -s "imediatube server
DMESG report" aztest@gmail.com
fi

No comments:

Post a Comment