Solved

linux restart service everytime it goes down automatically

Posted on 2009-07-13
5
502 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

626 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