Tronsole (troubles)

Something else for Armagetron? Goody!
Post Reply
User avatar
hoop
Round Winner
Posts: 201
Joined: Tue Jul 24, 2007 7:45 am
Contact:

Tronsole (troubles)

Post by hoop »

hello everybody

I started this week developing a simple but powerfull project, called Tronsole.
It's a bash script that must be run by terminal (linux), and allows to do some useful things with my/your server:
-start/stop or monitoring the server
-start/stop map rotation
-add/remove items to map list
-activate/deactivate player enter password (for matches or else)
-send direct commands to server easily
-load/rotate settings
-do any interactions with players by chat commands (e.g. voting to increase CYCLE_SPEED)
-allow a remote admin with restricted rights to do commands
-anything else my/your mind will generate

I have tested on my server a first simple version of the script (previous name was HAL-9001 :wink: )
I made it to test online different maps with other players fastly, just typing "/msg hoop map load <map name>", and shared it with Xian (which used it on Immortal Dinasty - Duel Nano server).
And it worked funny (HAL said "WELCOME <nick>" to every new player, or answered to chats msg like "lag", "hi hal", "lol", etc.).

I restarted to write it from beginning, to make it better organized and to implement server test/start-stop code, but I found a trouble starting armagetronad-dedicated binary:
using something like:

Code: Select all

while true
do
   read command
   if [ $command == "start" ] then
      $arma_bin --options > $log_file &
   fi
done
The script obviously starts the server, without displaying any outputs, as I want, and storing the stdout to $logfile.

The matter is that I felt strange behaviors with my pc:
e.g. Sometimes (not always :? ) if I start a client and join the server, the screen freeze a frame for about 50 msec every regular interval (1-2 seconds).
After that, the same happens if I join another online server, even restarting the client.
Then, rebooting linux and starting the server again, this bug won't happen. If I restart the server, sometimes the bug comes back, sometimes not.
Other starange things happens with the video device, showing me red pixels in wrong places. But I'm not sure it's not my pc's fault :x

So, the 1,000,000 $ question:
Is there something wrong in the bin launch code, or may be there a bug in arma?
I'd make a debug if anybody wants to tell me how.
(I'm running Ubuntu 6.06 LTS Dapper Drake, for clarity)

thanks for reading


-hoop
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Tronsole (troubles)

Post by Z-Man »

hoop wrote:

Code: Select all

      $arma_bin --options > $log_file &
The only thing I see as possibly wrong is this start line; armagetronad reads from standard input and should freeze if you put it into the background like that, unless you give it the -d option.

About the other problems: the freezes sound like they are caused by a background process blocking the CPU every once in a while, or maybe forced CPU throttling to prevent overheating. The random pixels sound like a hardware or driver error, no way any application can cause them.
User avatar
hoop
Round Winner
Posts: 201
Joined: Tue Jul 24, 2007 7:45 am
Contact:

Post by hoop »

thank you z-man

actually my script runs arma-dedicated so:

Code: Select all

tail -f $tmp_file | $arma_bin $options > $log_file &
and uses the $tmp_file to give commands to the servers.

It seems working good now.
Sometimes, when I do "strange" things with the code, the freezing bug comes back, but now it's not as usual as before.

Another trouble happens if I start the server, then quit the script, and leave alone the PC. After a long time (eg. the whole night), the server got closed. I'm not sure of how many time and if I did anything bad, I need to test that more times, indeed.
Do you believe it could be a normal thing to happen?
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Yes, the quitting is normal. Check out the docs for DEDICATED_IDLE, it defaults to 24 hours. After running for that long, the server quits when nobody is idle. The standard script restarts the server then.
Post Reply