View Full Version: Perl Script To Check If System Services Are Up

LawsonTalk > System Admin > Perl Script To Check If System Services Are Up



Title: Perl Script To Check If System Services Are Up


area51 - May 14, 2007 09:16 PM (GMT)
We had an issue where Processflow emails were not being received and we didn't know because the SMTP server was down. I found this script which I run about every hour that check's to make sure the SMTP server is up; If not then it sends an email to the system - you could also direct to send an email to another server.

http://www.webreference.com/perl/scripts/moniker/

You also need to install some Perl modules before this will work:
* Net::Telnet;
* Mail::Sendmail;
* Getopt::Std;
* Text::CSV_XS;

You can find these at the cpan website.

area51 - May 14, 2007 09:33 PM (GMT)
Don't know why but I couldn't edit the post.

The links on the webpage above for the script didn't work, so here is the script

schroncd - May 14, 2007 10:11 PM (GMT)
I'm not trying to be a smart-@$$ but how do you send an email if your smtp server is down?

trezaei - May 14, 2007 10:43 PM (GMT)
QUOTE (schroncd @ May 14 2007, 10:11 PM)
I'm not trying to be a smart-@$$ but how do you send an email if your smtp server is down?

Ahahahahaha lol, OWNED!!

area51 - May 15, 2007 02:49 AM (GMT)
QUOTE (schroncd @ May 14 2007, 02:11 PM)
I'm not trying to be a smart-@$$ but how do you send an email if your smtp server is down?

I was checking to see who was paying attention. :P

That's why I said to a DIFFERENT email server as an option. Usually it would go the local system if you have it setup.

area51 - May 15, 2007 02:52 AM (GMT)
QUOTE (trezaei @ May 14 2007, 02:43 PM)
QUOTE (schroncd @ May 14 2007, 10:11 PM)
I'm not trying to be a smart-@$$ but how do you send an email if your smtp server is down?

Ahahahahaha lol, OWNED!!

Almost :afro:

shane pennington - May 15, 2007 11:03 AM (GMT)
QUOTE (area51 @ May 14 2007, 07:49 PM)
QUOTE (schroncd @ May 14 2007, 02:11 PM)
I'm not trying to be a smart-@$$ but how do you send an email if your smtp server is down?

I was checking to see who was paying attention. :P

That's why I said to a DIFFERENT email server as an option. Usually it would go the local system if you have it setup.

Well I had the same question as David. The original post said "send an email to a different server, not through a different server.

I'm glad that's all been cleared up. So now I just need to explain to my clients their need to have two smtp servers on separate physical boxes. :blink:

schroncd - May 15, 2007 12:41 PM (GMT)
That's really not a bad idea. I like redundancy - I especially like redundant redundancy. But I think redundant redundant redundancy is just going too far.... :huh:


area51 - May 15, 2007 03:45 PM (GMT)
QUOTE (schroncd @ May 15 2007, 04:41 AM)
That's really not a bad idea.  I like redundancy - I especially like redundant redundancy.  But I think redundant redundant redundancy is just going too far.... :huh:

That's a bit redundant :rofl:




Hosted for free by InvisionFree