Perl script to monitor both disk usage and CPU load and notify via email
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I need a script that emails if the CPU load goes above a certain threshold and also if disk space on several partitions exceeds a certain percentage.
Great; so where are you stuck?? Post your efforts and show us what you've done, and we can help. Otherwise, there are LOTS of existing scripts you can find easily with a brief search to help get you started.
We aren't going to write your scripts for you...read the "Question Guidelines" link in my posting signature.
An existing script. CPU load is not essential. I downloaded and installed two different Perl scripts that come up in a search and none of the work.
Ok, so again: post what *YOU* have done/tried, and provide details. We are still not going to write your scripts for you, and just saying 'none of the work' tells us nothing.
And after using Linux for FIFTEEN YEARS at this point, a small script should be something you can easily do.
Ok, so again: post what *YOU* have done/tried, and provide details. We are still not going to write your scripts for you, and just saying 'none of the work' tells us nothing.
And after using Linux for FIFTEEN YEARS at this point, a small script should be something you can easily do.
You completely missed the point and the focus of the question. I am not interested in doing development now (on a production server) and then submitting the code for peer review and debugging and going through that process. I needed something "yesterday". If I had time to write it, I would not be inquiring here. In light of the fact there is a gazillion scripts that already exist and already have been written and debugged and it's pointless to reinvent the wheel. I was hoping to get a link to one based on the forum knowledge, not a "Why don't you do it yourself" response. If you don't know any, your response does not add any value to the discussion.
You completely missed the point and the focus of the question. I am not interested in doing development now (on a production server) and then submitting the code for peer review and debugging and going through that process. I needed something "yesterday". If I had time to write it, I would not be inquiring here. In light of the fact there is a gazillion scripts that already exist and already have been written and debugged and it's pointless to reinvent the wheel. I was hoping to get a link to one based on the forum knowledge, not a "Why don't you do it yourself" response. If you don't know any, your response does not add any value to the discussion.
I most certainly *DO* know how to do this, as do all of the other responders here.
What we ALSO now know is:
You are getting PAID to do a job
You don't WANT to do the job
You expect US to do it for you, for free
Want a program written for you? Then PAY SOMEONE to do it. Same is true for anything else in life, from painting your house, repairing your car, or cooking your food. Pay someone, or do it yourself.
Again, you don't have to 'reinvent the wheel'...you just have to modify something slightly, which you are apparently unwilling to do, and you're even unwilling to look any of this up for yourself, and want us to do it and give you a link. You said you had already FOUND two (and don't say which ones), then said they don't work (but don't tell us WHAT doesn't work/errors/messages/ANYTHING).
And I think you completely missed the rules of this forum.
From the other hand you gave no real information, therefore we cannot suggest you anything else but look for something suitable. You are the only one who knows the details and the requirements. Oh yes, do not try two perl scripts because they won't work. Try something else.
And I think you completely missed the rules of this forum.
From the other hand you gave no real information, therefore we cannot suggest you anything else but look for something suitable. You are the only one who knows the details and the requirements. Oh yes, do not try two perl scripts because they won't work. Try something else.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.