LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 02-15-2003, 01:10 AM   #1
KendersPlace
Member
 
Registered: Feb 2003
Location: Phoenix, AZ - USA
Distribution: RedHat 8, Micro$haft
Posts: 33

Rep: Reputation: 15
Monitor and Restart - Bkg Processes?


Hello again. I posted yesterday and got a quick response of exactly what I was looking for. Had another question.

I have written a basic bash script which runs 'wget' in a loop to get remote .jpg images off a camera feed. I run the script with the "&" following it so it drops into the background. The script should continue to run in a loop as long as the box is up.

I've been running it over 24 hrs now without a problem. My question is, is there some way to monitor this bkg process and auto restart it if it dies for some reason? Basically a deamon of some sort that says "if process XXX running, do nothing, else, start process XXX into the background".

I would also like to write something that checks the incomming directory for the wget files and if the file isn't updated in xxx seconds, kill and restart the script.

Thanks again for any help! I am a 5+ year Windows developer, forced onto a Linux box for a project 6 months ago and I LOVE everything about L so far. Still learning my way around, but I'll have all my other projects converted to L based servers within the next year.

-K

Last edited by KendersPlace; 02-15-2003 at 01:11 AM.
 
Old 02-15-2003, 02:27 AM   #2
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,022

Rep: Reputation: 45
I'm not sure about how to monitor it but... the -b option for wget puts it in the background and makes it write to a log file in the working directory (wget.log, wget-log.1, etc.) So you could monitor those text files.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
monitor processes to be notified when a new process is started? cfh Programming 2 10-03-2005 07:07 PM
Lots of Processes in system monitor gauntalus Linux - General 2 03-03-2005 12:03 PM
Want to monitor processes of several hosts through web page, how? huangyanfeng Linux - General 1 05-26-2004 02:36 PM
switching from monitor to tv out with no XFree restart? Gildas Linux - Hardware 3 05-25-2004 11:48 PM
Monitor & respawn a BG Processes? amaze Linux - General 2 08-12-2003 09:02 PM


All times are GMT -5. The time now is 03:17 AM.

Main Menu
 
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
Open Source Consulting | Domain Registration