Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 02-20-2006, 07:46 AM   #1
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, 08:11 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Read this:

Download and install daemontools.

Then follow the instructions here:
Old 02-20-2006, 09:56 AM   #3
Senior Member
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
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:
mt:2345:respawn:/bin/su - mythtv "/usr/local/bin/mythbackend -l /var/log/mythtv/mythbackend"
Old 02-20-2006, 10:43 AM   #4
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.

Old 02-21-2006, 01:04 AM   #5
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....


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 05:22 PM
howto monitor process and autostart if killed houssamfarag Red Hat 1 12-23-2005 11:02 AM
Autostart program mrrrl Red Hat 1 03-27-2005 01:58 PM
How to set a program to autostart upon Fedora Boot j3ff Fedora 1 08-30-2004 06:32 AM
remove a database service from autostart ncole Linux - General 1 01-20-2003 05:07 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:59 PM.

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