Parse qshape output and send email alert


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Parse qshape output and send email alert
# 1  
Old 09-23-2014
Parse qshape output and send email alert

Hi

I need help to do this. This is the output of qshape:
Code:
user$ qshape deferred|head

                                         T  5 10 20 40 80 160 320 640 1280 1280+
                                  TOTAL  0  0  0  0  0  0   0   0   0    0     0

T stands for minutes elapsed and TOTAL is the total number of emails in queue.

How can I make the system to check the number of total emails under minute 20 and send me email alert if the total is more than 1000 emails?

Can you also propose me a simple email script to work with this?

Thanks
# 2  
Old 09-23-2014
Hello zorrox,

I have a few to questions pose in response first:-
  • What have you tried so far?
  • What output/errors do you get?
  • What OS and version are you using?
  • What are your preferred tools? (C, shell, perl, awk, etc.)
  • What logical process have you considered? (to help steer us to follow what you are trying to achieve)
Most importantly, What have you tried so far?

There are probably many ways to achieve most tasks, so giving us an idea of your style and thoughts will help us guide you to an answer most suitable to you so you can adjust it to suit your needs in future.


We're all here to learn and getting the relevant information will help us all.


Robin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Loop to execute 2 times and send an email alert

After the successful start of server, it should check the status again, if it is not running ,it should go through the loop for 2 times. Even after two times of execution if still the server is not running it should send an alert email. Please help (1 Reply)
Discussion started by: thomas9192
1 Replies

2. Shell Programming and Scripting

Send email if Output is available

hello can anyone debug these lines cd /usr/local/scripts ./build update ./build versions | grep available if then mail -s "update for server `hostname`" $EMAIL else echo -e "$YELLOW No update $RESET" fi echo "Please press a key - Back to main menu . . ." ; read but... (3 Replies)
Discussion started by: nimafire
3 Replies

3. Shell Programming and Scripting

Send output of a command as an email

Hello Unix Experts! We are on AIX 6.1 TL6 I am trying to develop a script that does the following: It should send the output of "df -g /directory/folder" command as an email to a user(someone@company.com) This is too simple and i can research on how to do it, but it would be great if... (2 Replies)
Discussion started by: atechcorp
2 Replies

4. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

5. Shell Programming and Scripting

Grep Stop status from the output of script and send an eamil alert.

Hello Team, I have script which gives below output. Server clustServer11 is in a STARTED state Server clustServer12 is in a STOPPED state Server clustServer21 is in a STOPPED state I would like to prepare script which will grep stop word from the above output and send an email alert. (5 Replies)
Discussion started by: coolguyamy
5 Replies

6. Shell Programming and Scripting

send an email of script output

Hi All, I'm trying to send some file which generated by script to my email. when I run the script I'm getting an email. Thats fine. But it seems to be all messed up like below Memory Status on ServerA: Mem: 3867444k total, 862680k used, 3004764k free, 54456k buffers!! CPU Status on ServerA:... (4 Replies)
Discussion started by: s_linux
4 Replies

7. AIX

How to send alert by email whenever failed login

Hi, I want to write a script to send alert by email whenever any failed login to the AIX. Can anyone tell how to do that? Thanks! Victor (1 Reply)
Discussion started by: victorcheung
1 Replies

8. Shell Programming and Scripting

parse the file and send email

Hi Experts, I am writing a script in which i want to parse the file and send the emails to some email-id's. The problem is like this-- I use to get some emails on saturday and sunday's but we do not work on these days. So what i want to do is forward those emails to some email id's. I want... (1 Reply)
Discussion started by: namishtiwari
1 Replies

9. Solaris

Shell script to send email alert for core dump

Friends, I am in search for a shell script that is capable of running as a cronjob and have to send out an email when ever there is a CORE DUMP. Please post the hints to achieve my goal. Thanks in advance. (1 Reply)
Discussion started by: rtatineni
1 Replies

10. UNIX for Dummies Questions & Answers

Help? Any method to send system alert email?

Dear All, I am a newer of Unix Administrator. I would like to know any way to make Unix syslog critical error send automatically to me by email. Then I don't need to check it manually and frequency everyday. Any suggestion? Thanks for all your kindly help. Jacky (1 Reply)
Discussion started by: ITJacky
1 Replies
Login or Register to Ask a Question