Tip: Script for Checking for Server Load
I wrote this simple bash script so I could tell the server’s current load by email. The script is run every 15 minutes and very lightweight.
#!/bin/bash `uptime|mail -s “Server Load as of $TIMESTAMP is $LOAD” $RCPT`
LOAD=`uptime | awk -F: ‘{print $5}’ | awk -F\, ‘{print $1}’`
RCPT=”kamotegirl@pinoytux.com”
TIMESTAMP=`date +%D\ %T\ %Z`
Then setup the cronjob to execute the script to run every 15 minutes and send an email to the RCPT.
*/15 * * * * /home/bom/load_alert.sh > /dev/null
Related Posts
2 Comments to “Tip: Script for Checking for Server Load”
Post comment
Search PinoyTux
Subscribe to Email Feeds
Blog Lounge
Popular Posts
Recent Posts
Drop your Card Here
Recent Comments
- baby
on My October Earnings from Adbrite - ramakanth
on My October Earnings from Adbrite - juan kara-an
on Cebu Pacific Airlines is Evil! - Eugene Engelbrecht
on Cebu Pacific Airlines is Evil! - David Beecher
on Howto: Install yum On RHEL 4









Lemme try this script. thanks.
patrick’s last blog post is Sex And The City The Movie
wish i could say the same with patrick. but i really don’t know what to do with the script
looks cool though 