Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Distribution: Gentoo Hardened using OpenRC not Systemd
Originally Posted by manju98458
i have script to monitor the disk space utilization in my linux server the script generate email when the disk uilization reaches to 85% and the cron is scheduled to monitor every 17 min. Both are fine but, the issue is that it will continousely generates email, is it possible to put limit on the script to generate the email only one time when the disk threshold reaches 85 % instead of multiple email alerts.
No need to do that. Linux has this already implemented this using disk quotas.
Hey, i've tested your script and it sends me mail every 15 mins to remind me of disk usage, however that's after i set the THRESHOLD to like 9. Am wondering when your THRESHOLD=85 why would it send you an email in the first place when your:
I am using the script to monitor the disk space of the folder. When the folder storage crosess more than 85 %
it will send an alert. So, it's generating the alert every 17 min. My utlimate aim is to limit the script to send the alert only one time instead of multiple alerts. For enabling the disk quota we dont have permission hence we are using the alert script in place to monitor.
Your OP (post #1) says 'Last edited by manju98458; Yesterday at 18:42. '
Now there is no script to look at; why did you delete it?
re script in post #7
hash-bang must come first, and using -x twice is redundant. Try
@OP: you want it to email you 'once'; define 'once' ie once per hr, per day, per week, per year ???
Please post your current version of the script and confirm the threshold and actual disk percentages.
As noted above, you claim threshold = 85, but your actual results as claimed don't have a number >= to that ...