LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 01-09-2013, 07:49 AM   #1
bjdodo
Member
 
Registered: Dec 2006
Location: Ireland
Distribution: Slackware 12, kubuntu
Posts: 35

Rep: Reputation: 16
services recovery


Hi

I am an experienced developer on Windows, but not too experienced on Linux. I am playing with memcached on CentOS, and I have achieved that it starts on boot by using chkconfig. However when I kill the process (by sudo kill PID) it never starts again. I know memcached is the most reliable application ever, but conceptually I'd still like to know that if it dies it can get a second chance.

In Windows in services there is a configuration for recovery where you can specify what you want to do if the process hosting the service dies (hence this concept is useful at least on Windows), but I did not find such a thing with chkconfig. I wonder if the Linux service management has something similar that watches a service and restarts it if it dies.

Thank you,
Jozsef
 
Old 01-09-2013, 08:01 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,688
Blog Entries: 54

Rep: Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956
The old school way would be to launch a process from an /etcinittab entry to have /sbin/init take care of re-launching it when it dies but this may cause other problems. Those with a fetish to re-invent the wheel would suggest you write a cron job to check if a process exists and restart it. I suggest you first examine (verbose / debug?) log files for clues as to why it won't restart and then look at Monit for watching services.
 
1 members found this post helpful.
  


Reply

Tags
chkconfig, recovery, service


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
[SOLVED] Combining anti-virus + data recovery + image recovery? littlebigman Linux - Software 8 08-12-2010 03:39 AM
Linux recovery of Windows workstations - using baremetal recovery Reefcrazed Linux - Software 20 01-06-2009 06:15 AM
LXer: How to backup MySQL and recovery Using Zmanda Recovery Manager LXer Syndicated Linux News 0 09-10-2008 05:30 AM


All times are GMT -5. The time now is 07:01 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration