Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

linux restart service everytime it goes down automatically

Posted on 2009-07-13
5
Medium Priority
?
510 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 2000 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

722 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