LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 01-30-2002, 01:43 PM   #1
2016
LQ Newbie
 
Registered: Jan 2002
Distribution: Mandrake 9.0
Posts: 13

Rep: Reputation: 0
Talking Would someone direct me to a good resource?


Lemme tell you want I want to do and I would appreciate a link to somewhere to learn about how to do it.

I am running SuSE 7.3 on a piece of crap, the only thing I want this box for is to be a Quake3 server. After about an hour or so Quake3 seg faults and that's the end of the quake server. I want to know how to make a script or something that would check to see if quake is running and if it isn't relaunch it. I was maybe looking a cron but that's not what I want, because it doesn't crash regularly I can't just restart it regularly. Any pointers, tips, or links would be greatly appreciated. BTW, I am running the box in console mode only and I can only SSH into it, otherwise I am sure there would be some kind of easier to use extensive help manual covering stuff like this, as it is going through man pages and stuff is slow in the going.
 
Old 01-30-2002, 10:18 PM   #2
theFuzzyOne
Member
 
Registered: Dec 2001
Distribution: redhat
Posts: 154

Rep: Reputation: 30
well... you could do a 'ps -C Quake' or whatever the running process is called and use the pid number you get to monitor it... for example, every hour (cron), you can check that this command returns a pid - if not, start quake again. i think 'ps -C quack -opid' will give you the number only.
 
Old 01-30-2002, 11:59 PM   #3
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
One way is after the command in the script you can start the script again.
/usr/local/bin/quakescripton

#!/bin/sh
quake
date >> /var/log/quake
echo quake crashed >> /var/log/quake
sleep 20 #make sure it's dead
quakescripton
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A Good Software Resource seesharp Linux - Software 2 11-24-2004 02:36 PM
any good resource about dependency in slackware? eeyoree Slackware 3 08-08-2004 07:54 AM
nedd a breakdown of vpn, or a good newbie resource Brain Drop Linux - Networking 0 10-04-2003 07:47 PM
Looking for a good DDNS resource RHnewb Linux - Networking 7 09-16-2003 07:43 AM
Need a good resource refference to C programming Thetargos Programming 5 06-28-2003 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:08 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