v12 dedicated servers and services
by Matthew Shapiro · in Torque Game Engine · 06/28/2001 (9:15 pm) · 10 replies
do V12 dedicated servers have the option to run as a service? If not what goes into making a server app run as a service?
#2
That's an idea.
question though (i'm not really THAT knowledgable about how services work but) If my computer goes off for power or something and i just boot my compputer up but don't log in will the server app still launch? (i know it takes 2 seconds to log in just asking)
And If i'm in a restricted user name (I don't feel the need to be in administrater all the time) will the server mainainer service keep the server app running while i'm changing w2k user names?
Also one more quick question. Is there a way to make the server maintainer service that when i give the shutdown command the app pauses the shutdown, saves the server information, shuts down the server, then continues with the computer shutdown?
06/29/2001 (5:05 am)
So you mean the best option probably would be to have a service that launches the servers and trys to keep it up untill i tell it not to (like to kill it if it crashes then restart it), right?That's an idea.
question though (i'm not really THAT knowledgable about how services work but) If my computer goes off for power or something and i just boot my compputer up but don't log in will the server app still launch? (i know it takes 2 seconds to log in just asking)
And If i'm in a restricted user name (I don't feel the need to be in administrater all the time) will the server mainainer service keep the server app running while i'm changing w2k user names?
Also one more quick question. Is there a way to make the server maintainer service that when i give the shutdown command the app pauses the shutdown, saves the server information, shuts down the server, then continues with the computer shutdown?
#3
Here is a simple script I use to keep my Tribes 2 dedicated server running:
#!/bin/sh
while true
do
./tribes2d -dedicated
done
You can run this on system startup or submit it manually in the background. Here is the command I use from KSH to submit it manually:
nohup t2server < /dev/null &
Some administrators use the "screen" command so they can connect back to the server console interactively but I usually administer the server in-game with remote console commands.
-- Johnie
06/29/2001 (7:35 am)
To keep a Linux dedicated server running (Quake, Tribes 2, etc.) most administrators create a looping script that just runs the server again if it exits.Here is a simple script I use to keep my Tribes 2 dedicated server running:
#!/bin/sh
while true
do
./tribes2d -dedicated
done
You can run this on system startup or submit it manually in the background. Here is the command I use from KSH to submit it manually:
nohup t2server < /dev/null &
Some administrators use the "screen" command so they can connect back to the server console interactively but I usually administer the server in-game with remote console commands.
-- Johnie
#4
If the console isn't really in the foreground where is it? does it make itself invisible?
What i was thinking of making a small program from scratch. Then have it somehow check to see if the server is still running. I'm not sure how yet. Then if the server isn't running it starts it up. Though with crashes it's sortof running untill you kill it so i'm not sure about that. Any ideas on how to execute checks or killing it automaticallly on crashes?
06/29/2001 (11:52 am)
Wait do you mean those sample scripts run in a seperate app or the server app? Also what happens if hte dedicated server is already running will it create more instances of the server?If the console isn't really in the foreground where is it? does it make itself invisible?
What i was thinking of making a small program from scratch. Then have it somehow check to see if the server is still running. I'm not sure how yet. Then if the server isn't running it starts it up. Though with crashes it's sortof running untill you kill it so i'm not sure about that. Any ideas on how to execute checks or killing it automaticallly on crashes?
#5
:top
c:
cd \v12
v12.exe -dedicated -mission data/missions/level1.mis
goto top
and then open the "Scheduled Tasks" tool that comes with Windows 98 SE, Windows NT 4.0 SP5, and Windows 2000 you can add a task that automatically starts the batch file everytime your computer starts (it will open in the background). If you are worried about having the server start in the fore ground you just have it start whenever you log in and have the server automatically log you in on start up.
I hope this answers your questions.
06/29/2001 (12:35 pm)
If you create a batch file like this::top
c:
cd \v12
v12.exe -dedicated -mission data/missions/level1.mis
goto top
and then open the "Scheduled Tasks" tool that comes with Windows 98 SE, Windows NT 4.0 SP5, and Windows 2000 you can add a task that automatically starts the batch file everytime your computer starts (it will open in the background). If you are worried about having the server start in the fore ground you just have it start whenever you log in and have the server automatically log you in on start up.
I hope this answers your questions.
#6
06/29/2001 (1:01 pm)
well that answers part of my problem. the other part is crashes hwile noone's at the server. In windows 2000 (so far in my experience) when a program crashes it just freezes and you have to manually tell w2k to kill it. How can i automatically havei t kill the server if it crashes and restart the server?
#7
It started the server(s) and then watched to make sure the server was still running. If it wasn't it would restart it.
06/29/2001 (4:03 pm)
Well.. T1 and T2 both shipped with versions of a program called Infinite Spawn. It did exactly what you are asking about.It started the server(s) and then watched to make sure the server was still running. If it wasn't it would restart it.
#8
--Rick
06/29/2001 (4:11 pm)
Infinite Spawn is a great little utility, you should be able to download it off any of the tribes fan sites. It is not a service because it needed to be compatible with Win95/98/ME. It would not be difficult to create something just like it to run as a service, a good pet project for somebody.--Rick
#9
06/29/2001 (9:42 pm)
woah that infinite spawn is just what i want really. Is it legal for us to use it in our games or do we need dynamix's permission?
#10
cd ..\
:top
date /t
time /t
Tribes2.exe -online -dedicated -mod (namehere)
goto Top
This is what I use in a Windows 2000 environment.
02/13/2003 (2:25 pm)
@echo offcd ..\
:top
date /t
time /t
Tribes2.exe -online -dedicated -mod (namehere)
goto Top
This is what I use in a Windows 2000 environment.
Torque Owner Rick Overman
Ryan does the Linux V12 servers running.
--Rick