Mail related


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mail related
# 1  
Old 09-10-2014
Mail related

I have maintaining 16 client PCs.I want to get a mail from client PCs whenever any one of the services are not working.Services like postgres ,sms , jts and synch etc.,The Client PCs are remotely placed.I want to develop this through shell script ,But I don't have an idea to develop this script.Please give me a script code for this concept.

This is mail id information,

* My mail id - abc@gmail.com

Client PCs are Client PC1 to Client PC16

I am expecting like as,

For eg:

If postgres service is stopped in client PC1 , then it automatically send the mail to my mail id . This is I want .

Mail information like ,
Please check here the postgres service is stopped please check and restart the service from this client PC1.

Last edited by kannansoft1985; 09-10-2014 at 11:44 AM..
# 2  
Old 09-25-2014
How tightly does the timing have to be? Scheduler on the PC might call the check script. It probably should report when state changes and periodically (8 hours?) if it is down. Still, this might be easier to set up in a looping script. Write a simple query to embed in the script, have it ask for password as it starts. If the query runs, the output will contain a special string, like "select 102030405+1020304050" and grep -c for 1122334455.
# 3  
Old 09-30-2014
Quote:
.Please give me a script code for this concept.
This is not how this forum is to be used
See last post of:
How to Troubleshoot the mail sending problem?

And you already opened a thread on the subject:
Service checking through shell script
Thread closed
This User Gave Thanks to vbe For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

2. UNIX for Advanced & Expert Users

How can I send a mail from my outlook or other mail accounts to UNIX server?

Hi all, I want to send a mail for my business needs from outlook account to an unix server (HP-UX) but I don't send any mail. While I can send from the unix server to my outlook account, I can't send from outlook to unix. How can I achieve this ? How can I send a mail from my outlook or other... (2 Replies)
Discussion started by: igelegin
2 Replies

3. UNIX for Dummies Questions & Answers

Minimal Mail Server Setup for Local Mail Transfer

I am trying to get stored mail out of an old mail client. I figured that the easiest way to do it is with IMAP by logging in with both clients. I can copy the mail to the server from the old mail client, and back down into the new mail client. Rather than using a real mail account on the... (2 Replies)
Discussion started by: nixie
2 Replies

4. Shell Programming and Scripting

need downloading related help...but its not related to unix

Hi All, I am trying to dowmload the zip file "zkManageCustomers.zip " but i dont have access. Can anyone help me to download this file See the below link- http://www.ibm.com/developerworks/opensource/library/wa-aj-open/index.html?ca=drs- Please help me as early as... (1 Reply)
Discussion started by: aish11
1 Replies

5. UNIX for Dummies Questions & Answers

[Solved] mail configuration related query

How do i configure my linux machine to send mail. I have two server out of which one is configured to send mails. However The other is still not sending mails .I have installed sendmail rpms and modified sendmail.mc file to include following parameter. dnl define(`SMART_HOST',... (0 Replies)
Discussion started by: pinga123
0 Replies

6. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

7. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

8. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

9. UNIX for Dummies Questions & Answers

mail problem (NOT Mail or Mail.app)

When I try to use the CLI mail, I get the following error. What's wrong? Welcome to Darwin! % mail root Subject: test test . EOT % /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory Do I just need to change the... (1 Reply)
Discussion started by: chenly
1 Replies
Login or Register to Ask a Question