Slide

  • LINUX

    LINUX:In 1969 AT&T made a decision to withdraw Multics and go with GECOS (General Electric Comprehensive Operating Supervisor / System), with AT & T in Bells Lab when Multics was withdrawn some of the programmers named Ken Thompson and Dennis Ritchie decided to rewrite operating system in order to support low cost computer..To Know More

    CLICK HERE

  • MICROSOFT

    MICROSOFT:Microsoft was established to develop and sell BASIC interpreters for the Altair 8800. It rose to dominate the home computer operating system market with MS-DOS in the mid-1980s,followed by the Microsoft Windows line of operating systems. To Know More

    CLICK HERE

  • CISCO

    CISCO:During the early 1980s, there was a married couple namely Len and Sandy Bosack who used to work in two different departments of computer located in Stanford University. This couple was facing problem in making their computers communicate with each other To Know More

    CLICK HERE

showinfo=1

Linux Script To Check Disk Space


Linux Script To Check The Disk Space and Send Mail if Limit Crossed.



we will create a script which will check the / disk space and send a mail if it crosses 80% of disk usage.

#cd  /scripts
#vi  diskspace.sh

#!/bin/bash
CURRENT=$(df / | grep / | awk '{ print $5}' | sed 's/%//g')
THRESHOLD=80

if [ "$CURRENT" -gt "$THRESHOLD" ] ; then
mail -r  diskreport@ittables.com  -s 'Disk Space Alert' admin@ittables.com << EOF
Your /  partition remaining free space is critically low. Used: $CURRENT%
EOF
fi


save and exit

#chmod  +x  diskspace.sh

For periodic check that is daily to run this script i.e every 6 hrs

#crontab  -e

*  */6  *  *  *  /scripts/diskspace.sh

save and exit


Now the above script will run in every 6 hrs

Note:- to mail stuff postfix or sendmail should be configured properly.




26 comments:

  1. Your blog is really nice and unique.I like it so much. Looking forward to going over your web page again. Thanks for sharing.
    www.thebusinessfinder.org |

    ReplyDelete
  2. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It's always nice when you can not only be informed, but also entertained!
    http://www.adamsbusinessconsulting.com |

    ReplyDelete
  3. A good informative post that you have shared and appreciate your work for sharing the information.
    www.volzbrosauto.com |

    ReplyDelete
  4. I agree with you. This post is truly inspiring. I like your post and everything you share with us is current and very informative, I want to bookmark the page so I can return here from you that you have done a fantastic job.
    www.autoshutotaska.com |

    ReplyDelete
  5. I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing.
    www.stonewedgetechnology.com |

    ReplyDelete
  6. Superbly written article, if only all bloggers oered the same content as you, the internet would be a far better place..
    computersupportetc |

    ReplyDelete
  7. Excellent and decent post. I found this much informative, as to what I was exactly searching for.The Article is quite impressive and thoughts been put up has clearly got something to state.
    http://www.vfarm.info |

    ReplyDelete
  8. It was wondering if I could use this write-up on my other website, I will link it back to your website though.Great Thanks.
    belarusforjournalists |

    ReplyDelete
  9. Generally I do not read article on blogs, but I wish to say that this write-up very compelled me to check out and do so! Your writing style has been amazed me. Thanks, very nice post.
    Simple Business Group |

    ReplyDelete
  10. The mesh of the sword is surely better than the previous version, so keep working on it.
    http://www.mfitnesslonetree.com |

    ReplyDelete
  11. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It's always nice when you can not only be ihealthynightlight.com |

    nformed, but also entertained!

    ReplyDelete
  12. This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article.
    www.themotechnetwork.com |

    ReplyDelete
  13. Hi, just wanted to mention, I liked this post. It was helpful. Keep on posting!
    www.used-toyota-cars.com |

    ReplyDelete
  14. hey, i have been looking for this kind of informative articles for such a long time, and i am really lucky to find out your work here.It is useful when i do that by myself or could make me know more clear on dealing with these issues. buy runescape gold , runescape gold
    Food Lovers Miami |

    ReplyDelete
  15. You might write about the services on the blog. You should disclose it's refreshing. Your blog conclusion could accelerate your shoppers.
    www.pro-autogas.com |

    ReplyDelete
  16. I enjoy what you guys are usually up too. This type of clever work and exposure! Keep up the amazing works guys I’ve incorporated you guys to my personal blogroll.
    http://www.fourthsectorhealth.com |

    ReplyDelete
  17. Hey there! This is my first visit to your blog! We are a collection of volunteers and starting a new project in a community in the same niche. Your blog provided us useful information to work on. You have done a extraordinary job!
    ortechmgt |

    ReplyDelete
  18. It's very easy to find out any topic on net as compared to textbooks, as I found this article at this website. 
    realmexteriors |

    ReplyDelete
  19. Thank you for sharing your thoughts.I truly appreciate your post thank you once again. http://previewspolice.weebly.com/

    ReplyDelete
  20. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work.

    ReplyDelete
  21. With a Hotmail account, you can send and receive emails quickly and easily as well as login and use all Microsoft services.
    hotmail login | create new hotmail account
    Creating a Gmail account is quick and easy. You can follow the tutorial to sign up Gmail here.
    gmail login | gmail sign in | install google drive

    ReplyDelete

Note:- Comment as: Option available to post without login select "Anonymous" from the drop down...........

For Latest Updates: Subscribe Now | | Test Your Knowledge, Take a Quiz now Click Here | | Site Best Viewed In Firefox

X