<html>
<body>
<br>
See below:<br><br>
<br>
At 03:55 AM 12/9/2004, you wrote:<br>
<blockquote type=cite class=cite cite>I would rather use screen than
nohup. preventing oneself from getting<br>
access to the console is something at least I wouldnt
recommend.<br><br>
screen -dmS ./cod_lnxded +set net_ip xxx +set net_port xxx +set<br>
sv_punkbuster 1 +set dedicated 2 +exec server.cfg<br><br>
screen -list<br><br>
screen -r PID<br><br>
Just my 2 cents, and rather than sym-links, try hardlinks for all
the<br>
pk3 files, and create actual copies of the binaries to each
instance<br>
rather than sym-linking. Or you can chmod the main binary so
that<br>
each execution of it will start itself in its own memory space and
not<br>
clobber other games running the same binary in the same memory
space.<br>
</blockquote><br><br>
You have been getting some excellent advice and wonderful help.<br>
Was doing great, up until this part here. (BTW, I also use
screen,<br>
is it more reliable than nohup. nohup protects against a Hangup
signal<br>
(-15), and there are other signs you wish to protect against. In
addition,<br>
I have seen instances, depending on execution scheduling, where the<br>
executable WILL receive a HUP signal if you terminate the shell
prior<br>
to it disassociating the controlling terminal from the process. (See
nohup(1))<br>
(In simpler terms, a nohup is simply fork(2)s a child, turns off certain
signal<br>
processing, and then disassociates itself from your shell process, making
its<br>
parent process your shell's parent process which is often process 1
init.<br><br>
With regards to copying executables, or using the same code. PLEASE<br>
use the same executable. You can use a hardlink if on the same
filesystem,<br>
(otherwise a ln will copy the file anyway), or symbolic. I recommend the
hard<br>
link. In addition, set the sticky bit on the executable.<br><br>
This will induce less lag, as the executable is, on execution, copied to
swap<br>
space only once for ALL instances, and not each time it is spawned. In
addition<br>
depending on the number of instances, there is a memory
savings.<br><br>
Linux will share text pages, however your Heap and Stack will be
allocated in a<br>
separate memory segment. If a process sharing an executable
attempts to<br>
write said executable, a fork_on_write(2) will be executed. (See
vmstat(1))<br>
Thus, if a single process goes hog wild, it will NOT impact readonly text
(aka<br>
code) (other processes sharing the same readonly text), at all.<br><br>
This does not mean if you have a BUG in the code, and one process
hits<br>
it, and goes in to a spin loop it won't impact your other processes. In
fact,<br>
regardless of what you do, if you have that type of bug, the result will
be<br>
the same whether you are running the same code or two
executables.<br><br>
Loading the text pages in to memory once saves memory, and has NO<br>
negative impact at all. I spent much of my early career writing
kernel code<br>
so I know all too often how this works. (Yes... Multi-threaded link
libraries<br>
especially!)<br><br>
But take all the other good stuff people have been providing to you.
They<br>
know their stuff. (Scripts even! can't get better than
that!!) Keep them coming...<br>
I just grabbed another Dual P4 3.0, and am migrating off two older
single<br>
pents. I am lazy and given a stub of code.... heck, Ill use it!
;-))<br><br>
Good luck to you.<br><br>
<br><br>
<br><br>
<br>
<blockquote type=cite class=cite cite>On Wed, 8 Dec 2004 13:17:06 -0600,
Jay Vasallo <jayco1@charter.net> wrote:<br>
> Good question. I am waiting for the linux version also. I am not
sure about<br>
> the homiepath in MOH-PA. I know if it has PB within the code, it
will have<br>
> the homepath. Sorry i can't be of much help.<br>
> <br>
> <br>
> <br>
> <br>
> ----- Original Message -----<br>
> From: "hotrod deathtoll"
<hotrod_death_toll@yahoo.com><br>
> To: <cod@icculus.org><br>
> Sent: Wednesday, December 08, 2004 1:05 PM<br>
> Subject: Re: [cod] Multiple COD:UO servers on the same box<br>
> <br>
> > Okay I didn't realize the command line switches<br>
> > fs_basepath and fs_homepath existed. That rocks!!
Do<br>
> > those command line switches work in MOHAA:SH too?<br>
> > Sorry for the MOH ques on the cod page but my server<br>
> > is running both.<br>
> ><br>
> > John<br>
> ><br>
> > --- Jay Vasallo <jayco1@charter.net> wrote:<br>
> ><br>
> >> You can always keep the lines nice and short and<br>
> >> just end the line with a forwared slash \ .<br>
> >><br>
> >> Example<br>
> >><br>
> >> nohup ./cod_lnxded +set fs_basepath /usr/games/cod<br>
> >> +set fs_homepath /home/hyppe/cod \<br>
> >> +exec tdm_mp.cfg +set dedicated 2 +map_rotate +set<br>
> >> net_ip xxx.xxx.xxx.xxx \<br>
> >><br>
> >> What happens if you make a mistake and the mistake<br>
> >> is on the start up line and you can't see it cause<br>
> >> it is scrolled off the screen? This way you can see<br>
> >> all lines in front of you at all times<br>
> >><br>
> >> =o)<br>
> >><br>
> >><br>
> >><br>
> >> ----- Original Message -----<br>
> >> From: Fredric Ollikala<br>
> >> To: cod@icculus.org<br>
> >> Sent: Wednesday, December 08, 2004 12:02
PM<br>
> >> Subject: Re: [cod] Multiple COD:UO servers on
the<br>
> >> same box<br>
> >><br>
> >><br>
> >> My question too. Below is an example what one
of<br>
> >> my startup scripts looks like.<br>
> >><br>
> >> #!/bin/sh<br>
> >> #<br>
> >> # cod startup script<br>
> >> #<br>
> >><br>
> >> cd /usr/games/cod<br>
> >><br>
> >> nohup ./cod_lnxded +set fs_basepath
/usr/games/cod<br>
> >> +set fs_homepath /home/hyppe/cod +exec tdm_mp.cfg<br>
> >> +set dedicated 2 +map_rotate +set net_ip<br>
> >> xxx.xxx.xxx.xxx +set net_port 28960 >/dev/null
2>&1<br>
> >> & <--- should be on the same line as above,
the<br>
> >> line was too long and was cut into 2.<br>
> >> ps ax |grep tdm_mp.cfg |grep -v grep |awk
'{print<br>
> >> $1;}' > /home/hyppe/cod/pid.tdmcod<br>
> >><br>
> >> exit 0<br>
> >><br>
> >> fs_basepath is where the game is
installed.<br>
> >> fs_homepath is where all user
configfiles,<br>
> >> logfiles, mods and so on goes.<br>
> >><br>
> >><br>
> >> Just put the text in a file called
"codtdm" or<br>
> >> whatever and do "chmod +x codtdm". To execute
it<br>
> >> just type ./codtdm<br>
> >> This will launch the server into the
background<br>
> >> and also create a file containing the server pid<br>
> >> (process id).<br>
> >><br>
> >> I use another script that runs every 10
minutes<br>
> >> using Crontab, to check if the server is still<br>
> >> running, if not it will be restarted executing the<br>
> >> script above.<br>
> >><br>
> >> Best regards:<br>
> >><br>
> >> Fredric Ollikkala<br>
> >><br>
> >><br>
> >><br>
> >> ----- Original Message -----<br>
> >> From: "Jay Vasallo"
<jayco1@charter.net><br>
> >> To: <cod@icculus.org><br>
> >> Sent: Wednesday, December 08, 2004 6:41
PM<br>
> >> Subject: Re: [cod] Multiple COD:UO servers on
the<br>
> >> same box<br>
> >><br>
> >><br>
> >> > Symlink? Why?<br>
> >> ><br>
> >> ><br>
> >> ><br>
> >> > ----- Original Message -----<br>
> >> > From: "hotrod deathtoll"<br>
> >> <hotrod_death_toll@yahoo.com><br>
> >> > To: <cod@icculus.org><br>
> >> > Sent: Wednesday, December 08, 2004 11:37
AM<br>
> >> > Subject: RE: [cod] Multiple COD:UO servers
on<br>
> >> the same box<br>
> >> ><br>
> >> ><br>
> >> >> Thanks David. That's what I
wanted to know<br>
> >> because I<br>
> >> >> wanted to keep it clean like you guys
are<br>
> >> running<br>
> >> >> yours.<br>
> >> >><br>
> >> >> Thanks again.<br>
> >> >><br>
> >> >> John<br>
> >> >><br>
> >> >> --- david@fuess.net wrote:<br>
> >> >><br>
> >> >>> That's how our servers are setup.
We have a<br>
> >> common<br>
> >> >>> install location for<br>
> >> >>> all games, then symlink the shared
components<br>
> >> into<br>
> >> >>> each games' home<br>
> >> >>> directory. The configuration files
are local<br>
> >> to the<br>
> >> >>> game so you can run<br>
> >> >>> different configs on each game
server if you<br>
> >> like.<br>
> >> >>> We normally designate<br>
> >> >>> one a Public server that we keep
"stock", one<br>
> >> a<br>
> >> >>> "Custom" server that
may<br>
> >> >>> have custom mods or maps, and
another a<br>
> >> "Match"<br>
> >> >>> server that is<br>
> >> >>> configured in accordance with the
rules of the<br>
> >> >>> competition league (TWL,<br>
> >> >>> OGL, whatever).<br>
> >> >>><br>
> >> >>> Dave<br>
> >> >>><br>
> >> >>> > -------- Original Message
--------<br>
> >> >>> > Subject: RE: [cod] Multiple
COD:UO servers<br>
> >> on the<br>
> >> >>> same box<br>
> >> >>> > From: "Darren
Rathbone"<br>
> >> <darren@rathbone.org.uk><br>
> >> >>> > Date: Tue, December 07, 2004
6:38 am<br>
> >> >>> > To: cod@icculus.org<br>
> >> >>> ><br>
> >> >>> > Certainly can, as long as the
servers are<br>
> >> using<br>
> >> >>> different ports and/or IPs<br>
> >> >>> ><br>
> >> >>> > Rgds<br>
> >> >>> > PapaLaz<br>
> >> >>> > {tTs.}'TechSpot.co.uk<br>
> >> >>> ><br>
> >> >>> > -----Original
Message-----<br>
> >> >>> > From: hotrod deathtoll<br>
> >> >>>
[<a href="mailto:hotrod_death_toll@yahoo.com" eudora="autourl">mailto:hotrod_death_toll@yahoo.com</a>]<br>
> >> >>> > Sent: 07 December 2004
14:34<br>
> >> >>> > To: cod@icculus.org<br>
> >> >>> > Subject: [cod] Multiple
COD:UO servers on<br>
> >> the same<br>
> >> >>> box<br>
> >> >>> ><br>
> >> >>> > Can you have two gameserver
processes use<br>
> >> the same<br>
> >> >>> > binaries and .pk3's without
any problem??<br>
> >> >>> ><br>
> >> >>> ><br>
> >> >>> ><br>
> >> >>> >
__________________________________<br>
> >> >>> > Do you Yahoo!?<br>
> >> >>> > Yahoo! Mail - Helps protect
you from nasty<br>
> >> >>> viruses.<br>
> >> >>> >
<a href="http://promotions.yahoo.com/new_mail" eudora="autourl">http://promotions.yahoo.com/new_mail</a><br>
> >> >>><br>
> >> >>><br>
> >> >><br>
> >> >><br>
> >> >><br>
> >> >><br>
> >> >>
__________________________________<br>
> >> >> Do you Yahoo!?<br>
> >> >> Read only the mail you want - Yahoo!
Mail<br>
> >> SpamGuard.<br>
> >> >>
<a href="http://promotions.yahoo.com/new_mail" eudora="autourl">http://promotions.yahoo.com/new_mail</a><br>
> >> >><br>
> >> ><br>
> >> ><br>
> ><br>
> ><br>
> > __________________________________________________<br>
> > Do You Yahoo!?<br>
> > Tired of spam? Yahoo! Mail has the best spam protection
around<br>
> >
<a href="http://mail.yahoo.com/" eudora="autourl">http://mail.yahoo.com</a><br>
> ><br>
> </blockquote>> <br>
S2----------------------------------------------------------------------------------<br>
Mark J. DeFilippis, Ph. D
EE
defilm@acm.org<br>
defilm@ieee.org<br><br>
<br>
</body>
</html>