LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-20-2006, 06:46 AM   #1
~=gr3p=~
Member
 
Registered: Feb 2005
Location: ~h3av3n~
Distribution: RHEL 4, Fedora Core 3,6,7 Centos 5, Ubuntu 7.04
Posts: 227

Rep: Reputation: 30
program to autostart a killed service


Is there a program that will monitor running services and if they shutdown due to any problem it will be automatically restarted by the monitoring program.

the reason is clamd got killed and cozed a problem to my qmail smtp server.
 
Old 02-20-2006, 07:11 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Read this: http://distro.ibiblio.org/pub/linux/...cr/daemontools.

Download and install daemontools.

Then follow the instructions here: http://www.linux.com/howtos/Qmail-Cl...WTO/x142.shtml
 
Old 02-20-2006, 08:56 AM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Mint, MX, antiX, SystemRescue
Posts: 2,337

Rep: Reputation: 358Reputation: 358Reputation: 358Reputation: 358
You could edit /etc/inittab and add a respawn event. Here's an example from my inittab file that makes sure mythbackend is always running for runlevels 2-5:
Code:
mt:2345:respawn:/bin/su - mythtv "/usr/local/bin/mythbackend -l /var/log/mythtv/mythbackend"
 
Old 02-20-2006, 09:43 AM   #4
Dmjmusser
Member
 
Registered: Nov 2005
Location: Detroit, Michigan -- USA
Distribution: Fedora Core
Posts: 90

Rep: Reputation: 15
There are two other possiblities I know of:

Link: Nagios
This is a network monitoring device that can monitor many services on remote host as well as your local host. You can configure Nagios in conjunction with cron jobs methinks to restart failed services. However, if you're only planning to monitor the local host and not many services across the network, then a tool as powerful tool such as Nagios is overkill and not worth it to you for the time it takes to understand and configure it.

The other option is

Link: Monit
This is also a program that can monitor a host and automatically restart it for you. Unlike Nagios, automatically restarting a failed service seems to be one of Monit's prime directives, while Nagios, though more flexible and powerful, will require some external configuration to get the restarting of services to work.

~Myles
 
Old 02-21-2006, 12:04 AM   #5
~=gr3p=~
Member
 
Registered: Feb 2005
Location: ~h3av3n~
Distribution: RHEL 4, Fedora Core 3,6,7 Centos 5, Ubuntu 7.04
Posts: 227

Original Poster
Rep: Reputation: 30
thank you very much nice info. sheesh i forgot daemontools that monitor qmail services....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
howto autostart an app when it crashs or killed houssamfarag Mandriva 3 12-27-2005 04:22 PM
howto monitor process and autostart if killed houssamfarag Red Hat 1 12-23-2005 10:02 AM
Autostart program mrrrl Red Hat 1 03-27-2005 12:58 PM
How to set a program to autostart upon Fedora Boot j3ff Fedora 1 08-30-2004 05:32 AM
remove a database service from autostart ncole Linux - General 1 01-20-2003 04:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration