LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-19-2011, 01:46 PM   #1
ragask
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Rep: Reputation: 0
supervise daemons


Hello u all,

I have time 2 time a need for tracking/monitor supervise application that will keep a track on my running scripts. 2 be more precise, i have a python script that i will like 2 run for like 24/7 under any circumstances. After some investigation i found daemontool, but i do think there is a better tools more , lets say, integrated into linux world like for example corn or at.

Thanks in advance

Br
Ra
 
Old 11-20-2011, 10:10 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by ragask View Post
Hello u all,
I have time 2 time a need for tracking/monitor supervise application that will keep a track on my running scripts. 2 be more precise, i have a python script that i will like 2 run for like 24/7 under any circumstances. After some investigation i found daemontool, but i do think there is a better tools more , lets say, integrated into linux world like for example corn or at.
Spell your words out. And it's "cron", not "corn".

Daemontool appears to be a Windows program...if you're talking about something else, please post a link to the site. The obvious answer (since you wrote the script), is to build some sort of process checker into it, so if the program dies, it will attempt a restart/alert you/take whatever action you want.

If you don't want that, you can check Google for MANY samples for "linux process check script", and see examples like this;
http://www.savelono.com/linux/bash-a...s-running.html
 
1 members found this post helpful.
Old 11-20-2011, 03:02 PM   #3
ragask
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
I know, correction as been notified...
Anyway, daemontools is definitively a linux tool check out http://cr.yp.to/daemontools.html made by D. J. Bernstein.

More like apache, sendmail and other, create a main process(monitor process) and use working thread.

Thanks for the info ..
 
Old 11-20-2011, 04:20 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by ragask View Post
I know, correction as been notified...
Anyway, daemontools is definitively a linux tool check out http://cr.yp.to/daemontools.html made by D. J. Bernstein.
Ahh...well, if it's already written for Linux/Unix...what other 'integration' do you need???
Quote:
More like apache, sendmail and other, create a main process(monitor process) and use working thread.
Yes..they usually save a PID identifier somewhere, perhaps in /tmp, with the process ID number of the started daemon. You can do the same with your program, and have a part of your script just watch for that PID. If it's seen, wait and check again in some time. If it's not, attempt a restart, and put in whatever restart logic you want. Personally, I try to restart 3 times, and email an administrator if that happens, and stop trying if you can't get things going in three tries.
 
1 members found this post helpful.
  


Reply



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
qmail /service/qmail-send: unable to open supervise mangueJOE Linux - Networking 20 04-19-2016 11:27 PM
Need help with /var/qmail/supervise/qmail-smtpd/run coolamit78 Linux - Networking 4 02-02-2012 10:50 AM
develop a program to supervise performance of system(CPU & RAM) anhtu234 Linux - Newbie 2 03-17-2009 02:37 PM
qmail/daemontools - 'supervise' service shuts down randomly Kamineko Linux - Software 1 03-16-2009 03:03 AM
Daemons mariua Linux - General 0 10-11-2001 05:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:19 AM.

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