hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Simple Shell Script To tell me when server reboots
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Simple Shell Script To tell me when server reboots

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 11-03-2005, 01:07 PM
capnqwest capnqwest is offline
WHT Addict
 
Join Date: May 2003
Location: Colorado Springs, CO
Posts: 127

Simple Shell Script To tell me when server reboots


Hi,

I'm relatively new to Linux and have a problem with some servers spontaneously rebooting under almost no loads with nothing at all in messages. I suspect hardware but five servers on two different switches has me puzzled.

I'm trying to keep from manually checking for reboots (grepping for 'syslogd startup succeeded') so I wanted to write a small shell script to automatically e-mail me when this event is written to messages.

I'm struggling with the syntax. Should I do this with a cron job? Anyone have any canned scripts they can share?

Reply With Quote


Sponsored Links
  #2  
Old 11-03-2005, 01:51 PM
Eglis Eglis is offline
Junior Guru Wannabe
 
Join Date: Oct 2005
Location: Quebec
Posts: 60
just add a like like this in your rc.local file and it should do the trick.

echo "Hi, i'm sorry to say that : ServerXYZ has rebooted again for no reason" | mail -s "ServerXYZ Rebooted" your@address.email

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Pingdom Talks Top Web Hosting Cities and Countries Web Hosting News 2013-03-27 18:49:54
Whistleblower Site Cryptome Hacked, Infects PCs with Drive-By Exploits Web Hosting News 2012-02-14 14:48:24
Control Panel cPanel Launches New Apache Configuration Script Web Hosting News 2011-12-28 19:41:39
Colocation Firm ColoUnlimited Offers Lease to Own Servers Web Hosting News 2011-11-28 21:50:19
Web Host AISO Launches Solar Powered VPS Hosting Services Web Hosting News 2011-06-08 19:59:34


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?