LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 02-05-2019, 09:23 AM   #1
etcetera
Member
 
Registered: Aug 2004
Posts: 436

Rep: Reputation: 17
Perl script to monitor both disk usage and CPU load and notify via email


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.
 
Old 02-05-2019, 09:26 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
do you want to pay for it?
 
2 members found this post helpful.
Old 02-05-2019, 09:27 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by etcetera View Post
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.
 
Old 02-05-2019, 09:54 AM   #4
etcetera
Member
 
Registered: Aug 2004
Posts: 436

Original Poster
Rep: Reputation: 17
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.
 
Old 02-05-2019, 10:02 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by etcetera View Post
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.
 
Old 02-05-2019, 11:45 AM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Webmin?
 
Old 02-06-2019, 09:41 AM   #7
etcetera
Member
 
Registered: Aug 2004
Posts: 436

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by TB0ne View Post
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.
 
1 members found this post helpful.
Old 02-06-2019, 09:48 AM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by etcetera View Post
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).
 
4 members found this post helpful.
Old 02-06-2019, 09:49 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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.
 
3 members found this post helpful.
Old 02-06-2019, 10:28 AM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by pan64 View Post
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.
Apparently, he has a KSH script that already works well:
https://www.linuxquestions.org/quest...8/#post5958591
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script for CPU usage, memory usage, disk partition space and service status reetesh.amity Linux - Server 6 10-12-2015 07:51 PM
Notifications don't show up (notify-send notify-osd) michal017 Linux - Desktop 0 05-06-2014 03:44 PM
[SOLVED] High CPU load, but low CPU usage (high idle CPU) baffy Linux - Newbie 5 03-13-2013 09:24 AM
Lan Samba Server. Want it to notify me when disk is running low via email? Moggertron Linux - Software 2 02-05-2012 06:43 AM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration