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
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.
Your blog is really nice and unique.I like it so much. Looking forward to going over your web page again. Thanks for sharing.
ReplyDeletewww.thebusinessfinder.org |
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!
ReplyDeletehttp://www.adamsbusinessconsulting.com |
A good informative post that you have shared and appreciate your work for sharing the information.
ReplyDeletewww.volzbrosauto.com |
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.
ReplyDeletewww.autoshutotaska.com |
I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing.
ReplyDeletewww.stonewedgetechnology.com |
Superbly written article, if only all bloggers oered the same content as you, the internet would be a far better place..
ReplyDeletecomputersupportetc |
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.
ReplyDeletehttp://www.vfarm.info |
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.
ReplyDeletebelarusforjournalists |
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.
ReplyDeleteSimple Business Group |
The mesh of the sword is surely better than the previous version, so keep working on it.
ReplyDeletehttp://www.mfitnesslonetree.com |
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 |
ReplyDeletenformed, but also entertained!
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.
ReplyDeletewww.themotechnetwork.com |
Hi, just wanted to mention, I liked this post. It was helpful. Keep on posting!
ReplyDeletewww.used-toyota-cars.com |
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
ReplyDeleteFood Lovers Miami |
You might write about the services on the blog. You should disclose it's refreshing. Your blog conclusion could accelerate your shoppers.
ReplyDeletewww.pro-autogas.com |
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.
ReplyDeletehttp://www.fourthsectorhealth.com |
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!
ReplyDeleteortechmgt |
It's very easy to find out any topic on net as compared to textbooks, as I found this article at this website.
ReplyDeleterealmexteriors |
I like your writing, it's very creative. I can not think of life to write about it, I do not know what to do. baixar facebook gratis , facebook baixar , baixar whatsapp gratis , whatsapp baixar , facebook descargar , descargar facebook gratis , descargar whatsapp gratis , descargar whatsapp gratis , baixar mobogenie gratis , descargar mobogenie gratis , mobogenie market
ReplyDeleteThank you for sharing your thoughts.I truly appreciate your post thank you once again. http://previewspolice.weebly.com/
ReplyDeleteWe are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work.
ReplyDelete
ReplyDeleteI really like all the points you have made
http://www.prokr.net/2016/09/thermal-insulation-companies-16.html
http://www.prokr.net/2016/09/thermal-insulation-companies-14_15.html
http://www.prokr.net/2016/09/thermal-insulation-companies-14.html
http://www.prokr.net/2016/09/thermal-insulation-companies-13.html
With a Hotmail account, you can send and receive emails quickly and easily as well as login and use all Microsoft services.
ReplyDeletehotmail 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
louboutin shoes
ReplyDeletekate spade
pandora charms sale clearanc
coach factory outlet online
air max 90
longchamp outlet store
toms outlet store
canada goose outlet
true religion jeans outlet
yeezy boost
zhi20161228
fitflop shoes
ReplyDeleteadidas superstar shoes
yeezy boost
nfl jerseys
discount oakley sunglasses
michael kors outlet clearance
cheap jordans for sale
coach factory outlet
coach outlet online
michael kors outlet store
170602yueqin
ReplyDeleteI definitely love this site.
http://prokr.webstarts.com/blog
http://prokrservices.bravesites.com
https://prokr.dreamwidth.org/
http://alsoltanh.com/