Solved

linux restart service everytime it goes down automatically

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
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…
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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

790 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