Solved

linux restart service everytime it goes down automatically

Posted on 2009-07-13
5
499 Views
Last Modified: 2013-11-08
is there to restart a service if it goes down (theres an issue where the customers internet goes down cant control it right now at the moment)

and it messes with a service on the linux box and if its not restarted it shuts off and i would have to reboot the machine..

is there some type of script to get if a service is unresponsive for 10 min setup a resart script on the whole box OR the Service..


thansk
0
Comment
Question by:ritztech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 7

Expert Comment

by:unSpawn
ID: 24842211
Have a look at "monit". Easy to configure checks/restarting, has web interface to restart services manually if you wish. Note that "just" restarting dying services usually is like treating symptoms instead of addressing the cause.
0
 

Author Comment

by:ritztech
ID: 24842911
it was a technique that i might need to address  later but its aiming towards THE ISP because their internet goes down also....



0
 
LVL 7

Expert Comment

by:unSpawn
ID: 24843605
I'm not sure I understand what you are trying to say. Is there a detail that needs elaborating on or a question that needs answering?
0
 

Author Comment

by:ritztech
ID: 24843632
could this just be configured if a service that needs to be restarted at a given time length also say once a night..

Asterisk to be more specific....

THanks
0
 
LVL 7

Accepted Solution

by:
unSpawn earned 500 total points
ID: 24843835
Monit checks conditions and then starts / stops services according to what you specify, and can additionally send alerts to log, email (no use if your 'net is down) or pager. Have a look at the Monit docs for configuration details and http://www.voip-info.org/wiki/index.php?page=Asterisk+Starting+and+Stopping if you want to see an Asterisk example.

"Restart once at night" sounds more like a cronjob to me.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question