Post Reply  Post Thread 
SwapIO alert
Author Message
Nilesh
Super Moderator
******


Posts: 42
Group: Super Moderators
Joined: Jul 2007
Status: Offline
Reputation: 0
Thank 0
0 was given thank in 0 posts
Post: #1
SwapIO alert

Following is the script which will send you email alert when swapIO us more than 100 MB:

Quote:
#!/bin/bash
io=`free -m | awk '{print $3}' | sed '1,3 d'`
info1="SwapIO is : $io MB"
str="============================="

if [ $io -ge 100 ]; then
info="SwapIO is more than 100 MB"
echo -e "$str\n$info\n$info1\n$str" | mail -s "Alert: SwapIO for `hostname` on `date`" abc@yourdom.com
else
# echo -e "$str\n$info1\n$str" | mail -s "Alert: SwapIO for `hostname` on `date`" abc@yourdom.com
fi


~~~ Cool Buddy ~~~

ADD TO DEL.ICIO.US  ADD TO DIGG  ADD TO FURL  ADD TO NEWSVINE  ADD TO NETSCAPE 
ADD TO TECHNORATI FAVORITES  Technorati ADD TO SQUIDOO  ADD TO WINDOWS LIVE  ADD TO YAHOO MYWEB  ADD TO ASK 
ADD TO REDDIT  ADD TO STUMBLEUPON  ADD TO GOOGLE   

07-15-2007 10:58 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  High load alert Nilesh 0 553 07-15-2007 11:23 AM
Last Post: Nilesh

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: