assistanz
Assistanz

Server load alerts shell script

cPanel Server Management

 

For 24×7 cPanel Server Management with Monitoring, Unlimited Tech Support, Disaster Recovery, Security updates and much more Signup today!

Simple Server load alerts shell script to monitor your server load average, Free Memory and Swap status, Disk space information. etc., Please make sure this script will not cause extra load average on your cpanel server. This shell script will send alert to your email account when the server load goes more than 10.

cd /root

vi loadalert

EMAIL=”your email”
SUBJECT=”Alert $(hostname) load average is $L05″
TEMPFILE=”/tmp/$(hostname)”
TOPLOAD=”10″
echo “Load average Crossed allowed limit.” >> $TEMPFILE
echo “Hostname: $(hostname)” >> $TEMPFILE
echo “Local Date & Time : $(date)” >> $TEMPFILE
echo “| Uptime status: |” >> $TEMPFILE
echo “——————————————-” >> $TEMPFILE
/usr/bin/uptime >> $TEMPFILE
echo “——————————————-” >> $TEMPFILE
echo “| Top 20 CPU consuming processes: |” >> $TEMPFILE
ps aux | head -1 >> $TEMPFILE
ps aux –no-headers | sort -rn +2 | head -20 >> $TEMPFILE
echo “| Top 10 memory-consuming processes: |” >> $TEMPFILE
ps aux –no-headers| sort -rn +3 | head >> $TEMPFILE
echo “——————————————-” >> $TEMPFILE
echo “| Memory and Swap status: |” >> $TEMPFILE
/usr/bin/free -m >> $TEMPFILE
echo “——————————————-” >> $TEMPFILE
echo “| Active network connection: |” >> $TEMPFILE
echo “——————————————-” >> $TEMPFILE
/bin/netstat -tnup | grep ESTA >> $TEMPFILE
echo “——————————————-” >> $TEMPFILE
echo “| Disk Space information: |” >> $TEMPFILE
echo “——————————————-” >> $TEMPFILE
/bin/df -h >> $TEMPFILE
echo “—————–THE END——————-” >> $TEMPFILE
L05=”$(uptime|awk ‘{print $(NF-2)}’|cut -d. -f1)”
if test $L05 -gt $TOPLOAD
then
mail -s “$SUBJECT  $L05” “$EMAIL” < $TEMPFILE fi rm -f $TEMPFILE chmod 755 loadalert Updated this script on your cronjob echo “*/5 * * * * /root/loadalert >/dev/null 2>&1” >> /var/spool/cron/root

Restart cron service

/etc/init.d/crond restart

cPanel Server Management 

 

AssistanZ is a pioneer in offering 24×7 cPanel Server Management Service since 2004. We offer 24×7 cPanel Server Management

 

cPanel Server Management

cPanel Installation and Setup

cPanel Server Optimization

cPanel Server Migration

cPanel Server Security and Hardering

cPanel Server Monitoring

cPanel Server Hack Recovery

and Much more    

 

DirectAdmin Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk
$ 99 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • NDA & SLA
  • SLA Review Meetings
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation
  •  

Platinum Support

24/7 Proactive Support
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Support

$ 30 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response Time
  • 4 Hours Resolution time for the Possible Issues
  • Security and Performance Optimization
  • React to Customers queries
  • Simple SignUp Process
  • Instant Account Activation
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support