UNIX email


 
Thread Tools Search this Thread
Operating Systems AIX UNIX email
# 1  
Old 03-13-2008
UNIX email

Is there a way UNIX can send an email to users when there is a problem in the system or a defunct process that needs to be killed?
# 2  
Old 03-13-2008
yes.

you start with a script that monitors stuff of intrest then you have a line of code that sends the email (man mailx)

then you call the script often using cron.

so you may have code like this.....


Code:
#!/bin/sh
DHCP=`ps -ef | grep dhcpd | grep -v grep | wc -l`
if [ $DHCP -gt 0 ] ; then
   echo OK
else
  echo "DHCP not running!!"  mailx -s "Server problem" bob@bob.com
fi


then in cron you have this called every half hour.
# 3  
Old 03-13-2008
the other option is to use a proper monitoring tool such as nagios.
# 4  
Old 03-13-2008
UNIX email

Thank you. I will try this.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

VIP Membership - The UNIX and Linux Forums - Get Your UNIX.COM Email Address Here

We work hard to make The UNIX and Linux Forums one of the best UNIX and Linux knowledge sources on the net. The site is certainly one of the top UNIX and Linux Q&A sites on the web. In order to provide certain members the best quality account services, you can now get some great extra features by... (2 Replies)
Discussion started by: Neo
2 Replies

2. UNIX for Beginners Questions & Answers

Email Alert in UNIX

Hi There I have to wrote a script where I am able to echo a result of an SQL script, however I want to be able to send an email to myself when it is more than 0 (so whenever a value is returned) is this possible? I tried one way from looking on the web but this didn't work, I have added my... (8 Replies)
Discussion started by: simpsa27
8 Replies

3. Shell Programming and Scripting

UNIX email issue

Hi all, I have tried to send an email with the below script. but i am not getting the subject of the email where it is present in the simply.txt. I am using HP UNIX server. I am not sure what mistake i made in the below unix command. any help would be appreciated. cat simply.txt ... (2 Replies)
Discussion started by: arun888
2 Replies

4. Shell Programming and Scripting

Sending email in UNIX

can you tell me what is the syntax if I need to keep someone in cc with the below email. mailx -s "shell script completed successfully" arun@gmail.com < /dev/null (4 Replies)
Discussion started by: ramkumar15
4 Replies

5. Post Here to Contact Site Administrators and Moderators

email@unix.com

Hi all! First of all, a great thanx to all of your who had the idea of this site. Seconndly, will an email@unix.com exist? Jason :D (4 Replies)
Discussion started by: a_new_admin
4 Replies

6. UNIX for Dummies Questions & Answers

Send email where # is in the email address - Using Unix

Hi All, How do I send an email using malix where email address contains a #. I have a email address like this : #test@test.com I want to send email like malix -s "TEST" #test@test.com < SOMEFILE I tried \# but doesn't work. Please let me know how we can achieve this? I am in... (1 Reply)
Discussion started by: jingi1234
1 Replies

7. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies

8. UNIX for Dummies Questions & Answers

Unix email problem please help

Please Help Urgently Currently on our Unix mail system we experiencing the follow: When we send new mail and when replying on email received we get the following error: Your message did not reach some or all of the intended recipients. Subject: FW: Backups Sent: 2003/06/03... (11 Replies)
Discussion started by: esh
11 Replies

9. News, Links, Events and Announcements

What about the email@unix.com idea?

I remember there was a topic about this idea long time ago. What happened to it? (13 Replies)
Discussion started by: HOUSCOUS
13 Replies
Login or Register to Ask a Question