glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] YOG


From: Kieran P
Subject: Re: [glob2-devel] YOG
Date: Sat, 17 May 2008 17:12:52 +1200

Hey everyone. Sorry it took me nearly 3 weeks to get to this. Have been job hunting.

I finally got a weekend off, and took the opportunity to implement what I had posted in my previous email regarding this matter. I also finally got round to (with help from Brad) fixing the beta2 starting problem, re adding the admins list (which are (case sensitive) k776, Giszmo, genixpro, nct, and AppleBoy. If I've missed someone, let me know) and also fixed a forum bug with attachment uploading.

Anyway, I've modified the scripts so that, when you run ./StartServers.sh, it kills all sh sessions open (which are the yog scripts in a loop 95% of the time), kills all the servers, then restarts them using each server script. The server scripts have been modified to cd into the src dir of the right release, cp glob2 to glob2-betaX where X is the version (this helps it to be easily identifiable in ps -Alf or top), and finally output the console output to a log file, rather than the /dev/null or whatever it was before. This way, if it wont start (and you'll see by continuous looping (i.e. > 3 lines, one for each server) of "unable to open preferences"), you can just look at the log to find out why. Here's the code:

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

h1145132:/home/glob2/glob2_servers# ls
Beta1YOGServer.sh  Beta2YOGServer.sh  Beta3YOGServer.sh  StartServers.sh  glob2  glob2-beta1-rc  glob2-beta2-rc  glob2-beta3-rc  logs
h1145132:/home/glob2/glob2_servers# cat StartServers.sh
# kill server startup scripts first
killall sh

# then kill all the old servers
killall glob2-beta1 &
killall glob2-beta2 &
killall glob2-beta3 &

# finally start new servers
sh ./Beta2YOGServer.sh &
sh ./Beta1YOGServer.sh &
sh ./Beta3YOGServer.sh &
h1145132:/home/glob2/glob2_servers# cat Beta1YOGServer.sh
#!/bin/bash

while sleep 5
do
        cd /home/glob2/glob2_servers/glob2-beta1-rc/src/
        cp -f glob2 glob2-beta1
        ./glob2-beta1 -daemon > /home/glob2/glob2_servers/logs/Beta1YOGServer.txt
done
h1145132:/home/glob2/glob2_servers# cat Beta2YOGServer.sh
#!/bin/bash

while sleep 5
do
        cd /home/glob2/glob2_servers/glob2-beta2-rc/src/
        cp -f glob2 glob2-beta2
        ./glob2-beta2 -daemon > /home/glob2/glob2_servers/logs/Beta2YOGServer.txt
done
h1145132:/home/glob2/glob2_servers# cat Beta3YOGServer.sh
#!/bin/bash

while sleep 5
do
        cd /home/glob2/glob2_servers/glob2-beta3-rc/src/
        cp -f glob2 glob2-beta3
        ./glob2-beta3 -daemon > /home/glob2/glob2_servers/logs/Beta3YOGServer.txt
done

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Perhaps in the future someone might mod it to run the servers in a lightweight gdb if such a thing exists, and store any crashes. Until then, the new scripts are much more stable and produce much less output when trying to restart them (before, when nothing was killed, it would pile up and have lots of port binding issues).

Enjoy.

Regards
Kieran


On Mon, Apr 28, 2008 at 8:34 PM, Leo Wandersleb <address@hidden> wrote:
Hi

> What I think might help, and I'm not knowledgeable to do this all myself,
> is
> rename glob2 instances in each compiled directory to glob2_beta1,

that should already been done (kind of). instead of cd-ing into the directory and run plain "glob2" i run beta1/src/glob2.
you can see this when you do a "ps -Alf". now you can kill by pid.

> Giszmo, your pretty handy with Linux shell scripts. Think this might be
> doable?

no time. but either it is simple (killall beta1/src/glob2 works) or it is doable to determin the right PID using grep and some tool i posted on the "automation of deb-package generation" where i isolate the substring of "hg identify".

Leo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]