![]() |
Re: Linux Admining
servers see everything
OK It has come up that someone has accessed someone elses nation and changed their turn actions. This has been verified. Its not unexpected and Ive been prepared for a long time. Yes I know that "is what happens when you dont password protect your god" or by using sloppy passwords when playing network games. Getting caught at it is also what happens when you play network games. Servers see EVERYTHING. Servers can see what IP uploads a turn. So the servers are able to see who is using player files they shouldnt be using. Example for Linux Code:
while [ x ] example for linux Code:
cd ~/dominions3/savedgames |
Re: Linux Admining
OK yet another lesson learned (that makes me look bad).
It appears that Dom3 can develop a problem. Im still trying to pin it down. Possibly something with the way a player disconnects. Im thinking maybe by hitting the red X in the upper right corner (in windowed mode) killing his program, instead of using the disconnect button on the menu when connected to the server. What I get is a log file full of continual (and very fast unfortunately) messages about trying to resend a packet. In any case, the result is a log file that grows larger and larger and larger until it fills up the machine and starts to crash things. The fix? I havent quite decided yet. Dont use debug logs? I dont use them all the time but when I do they are extremely useful. Or a watchdog script that "sees" the runaway log-growth and kills that game? Im abit to eager to do watchdogs. Im beginning to think I have too many running now. Or maybe keep the logs on a different drive? I can do that. Have the logs write to the /backup which is a separate hard drive. That way at least when it fills up it wont crash other things. But that will make game cleanup alot more complicated. I have enough of that already. |
Re: Linux Admining
hmmm... I wonder if I can get along with a soft link to the separate drive. That way the game.log in the games directory is kept elsewhere but can be cleaned up with the game
|
Re: Linux Admining
OK we are back to the runaway logs problem.
There might be two versions. One that does continual packet messages which might be due to users not disconnecting properly (killing dom3 instead of using the quit). And one where a combat loops. Unfortunately, when it happens the panic to fix it before it wipes out the whole server tends to destroy the evidence of what caused it. :) Oops, my bad. Hey, no one else seems to be coughing up anything helpful. This is NOT what I planned to do today. But I might get around to testing out soft links. That would be my best bet since it would not mean totally rewriting all the scripts from scratch. The next option would be a watchdog script to continually watch for the harddrive getting 90% full then text messaging me. For just this problem that would seem to be sloppy and overkill but on the other hand it would be a reasonable thing to have in place since runaway processes and runaway logs CAN be caused by other programs on the system (much rarer but it can happen). I should probably do a search since it seems like someone might have already come up with something along this line that I can just download. The last option would be redesigning the whole Dom3 games setups. There are many "gee I wish you would" on the lists that could be tackled at the same time. I really thought someone else would have done a "serious direct server" by now to match the quality of the two excellent PbEM servers and one excellent game registration server. This choice is abit of a daunting task since the scripts are SOOooooooo spaghettied now. Virtual drives? Hard and Soft Links? Split game directories using Dom3's internal variables like DOM3_DATA or DOM3_CONF? Dom3 already hogs the /tmp directory far beyond any other internet service and does a lacking job of cleaning up (something else on the need-to-script list). Another plus to the redesign and rewrite options is the number of games is hitting a max. If I keep doing the always-open blitz-type games then I might need to create a new account to manage the games other people are having me host. It would make it easier to keep one from impacting the other. I keep hitting the limit on maps or game directories or mods. I dont THINK splitting the "user" would split the cpu load but Id have to test that. And as long as Im considering a new user with hard-set limits I MIGHT consider adding another for the must-have-a-menu crowd to put into play something like http://www.dom3minions.com/lab/MakeGame.htm which has been around longer than anyones. Altho Im still not sure about automation on a server that isnt totally Dom3 dedicated. Pros and Cons. |
Re: Linux Admining
OK this is for a game with a 24 hour host timer that wanted 12 hour reminders.
# if the game name is "megagame" then I use queue M or queue m # so in the pre.sh # remove the old reminder timer in case quickturn kicked in atrm `atq |grep "M domgames"|cut -f1 ` # set a new timer to run reminders.sh in 12 hours in queue P at -f reminders.sh -v now + 12 hours -q M # then the reminders.sh has a line for each nation and its owner # if fatherland is newer than the last .2h for that nation then email if [ ftherlnd -nt early_pangaea.2h ] ; then echo "waiting for your turn" \ |mail -s "MegaGame is waiting" gandalf@community.net ; fi I could tighten it up abit by adding a check of the stats.txt for whether the nation is still playing and not AI to avoid false reminders. Maybe later. |
Re: Linux Admining
Now I have a new "check the game" script for personal games on the server. So far it looks like this..
Code:
Dominions 3 Scores, goongame turn 16 If the game is called goongame then cat goongame.cgi gives HTML Code:
#!/bin/bash That gives us a nice html header, and title, game name, and the turn number. The next section grabs the tail end of the game.log twice (created by the dom3 debug switch). That gives us game name, how much time is left on the timer, and the note (quickhost) if its on. then it lists the nations and lets us know who is connected *, who has done a turn +, who hasnt done a turn -, and who is AI ( ). The final section lists the player files with a red asterisk on anyone the game is still waiting on. Yes thats redundant but it has two purposes. The file names are sometimes clearer than the 2-letter codes, and it works even BEFORE the game starts so it makes an easy way for the person who is running the game to see who has turned in a pretender. All of this is so that people can use a browser to check their games status as much as possible without having to load up Dom3 to connect in order to see it. |
Re: Linux Admining
I know this isn't quite a linux question, but it seems like the right place.
I was planning on trying to host some games from my Mac. I figured this would be straightforward because the Mac is a unix based OS, and I've done it from a Linux machine before. But I can't get it to run in a properly text-only mode as a background process. Has anyone had any luck doing this? |
Re: Linux Admining
Well I can give you an answer for Linux test-mode...
Here is an example script from my system of an actual game.. Code:
nohup nice dom3 --era 2 -g Warhammergoons --port 28911 -STddd \ nohup: No Hangup command so I can log off without the game dying nice: so it doesnt hog the CPU &: the ampersand at the very end of the script is what tells it to run in background a common error is running it & (background) but forgetting nohup (no hangup) so when you logoff, it dies |
Re: Linux Admining
I was about to say: I haven't seen a Unix command in about 20 years. I see people are still writing "nohup nice ... &", amazing ;)
I used to use /bin/csh. Do I vaguely recall, there you didn't have to "nohup" if you "&"-ed, because its background processes were automatically immune? :eek: |
Re: Linux Admining
Quote:
|
All times are GMT -4. The time now is 04:55 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.