Solved

linux restart service everytime it goes down automatically

Posted on 2009-07-13
5
484 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
  • 3
  • 2
5 Comments
 
LVL 7

Expert Comment

by:unSpawn
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
This article will show, step by step, how to integrate R code into a R Sweave document
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…
The viewer will learn how to dynamically set the form action using jQuery.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now