Server concept
#1
Hi,

I have some questions about how AC servers run as there is no real documentation on this.

If you choose to not run a DNS server and host one at home for a day, how much will it affect the computer?

1. It doesn't take much bandwidth.

2. Does it save anything? How much memory does it take up per hour? Where does it save this? Can you delete it?

Thanks for answering :)
Thanks given by:
#2
Server bandwith requirements*
*OUTDATED, but should work on a "scaled" approach

If you set it up in servercmdline.txt to save it all then yes it will.

Define where you will save demos with -W in servercmdline.txt
AssaultCube Documentation :: Command line arguments

Logs get stored in AC installation folder.
Thanks given by:
#3
Thanks for answer, but you didn't make it clear:

Do logs create new files? Or are they just .tmp and deleted when terminal is closed?

If yes, which directory are they created in?

Thanks :)
Thanks given by:
#4
(01 May 11, 01:38PM)SiL3nT Wrote: Do logs create new files? Or are they just .tmp and deleted when terminal is closed?
It depends how you set it up. By default the server will log to syslog (linux/Mac) or a file in the AC folder (Windows), but you can change whether or not logs are created with the -LS or -LF switches.
Thanks given by:
#5
Thanks jamz!

This should create a new file for logging: (I am on
Linux)
-LS5
-LF0
Is there any way of controlling the directory of this file?

Also, I have used the -W switch and used the directory as was in the doc example. I created the directory, but demos still don't get saved there :s. Where do the demos go by default?

Thanks for the help :)
Thanks given by:
#6

I figure you can just make a cron job to do it at some interval.

mv /home/user/assaultcube-dir/serverlog*.txt /home/user/newlogdir/

I tested and it looks like you can have a server running while this command moves the logfile in use to another directory, and it will keep logging correctly to the same file in its new location, rather than creating a redundant logfile in the default location as I thought it would. So there's one less thing to worry about.

For your demo issue, try chmodding 777 that directory and then try again, just to rule out any permissions issues. AFAIK demos don't get saved on the server unless you use -W; they just sit in the queue in RAM until they're pushed out by newer ones.
Thanks given by:
#7
Alternatively, use the syslog. My servers all use -LS0, but in syslog.conf I have:
...local6.none...     -/var/log/syslog
local6.info        -/usr/games/ac/log/justice.txt
...which stops AC server output going to syslog and creates that log file instead. I then use cron to rotate the log once a day.

Regarding -W, I believe the demos are always written relative to the AC folder. This means if you want to save to a subfolder of AC you can use, eg.
-W demos/justice_
but if you want to put the demos somewhere else, you have to go up through the folders, eg.
-W ../AC_demos/justice_
would put the demos in a folder called AC_demos at the same level as the main AC folder.
I could be wrong, and absolute paths may work for the demos; I haven't tested it. (Using this, your demos would be called 'justice_demoname...')
Thanks given by:
#8
Additionally, if you do decide to keep these logs you will save some space by NOT enabling verbose mode (debug messages and other things like individual votes are kept as well).
Thanks given by:
#9
Thanks for your replies :)

Review the logs (which now work (thanks)) I found this line:

failed to write demo t0 file "wtvr/wtvr.dmo"

all permissions are set to 777, so I don't really see the problem for this. However, my point from the start was to disable this. Does this mean that after reaching the demo RAM limit on the server the demos get deleted and not saved anywhere on my computer?

Each time a user sends a map, does the size of the map get saved on the computer?

BTW is verbose logging off by default?

Thanks for help :)
Thanks given by:
#10
(01 May 11, 07:59PM)SiL3nT Wrote: Does this mean that after reaching the demo RAM limit on the server the demos get deleted...
Yes; the oldest gets deleted.
Quote:Each time a user sends a map, does the size of the map get saved on the computer?
Yes; I have had 1,132 maps sent to my mapping server since the start of March. They take up a little under 6MB (including .cfgs - 1 for each map). You can set the maximum space you wish them to take up with the -Z switch.
Quote:BTW is verbose logging off by default?
Yes, but if you use -LF0, you're turning it on.

Thanks given by:
#11
The only time i have gotten "failed to write demo ...." is when AC thinks im running out of HDD space.
This makes my client loose all settings to and it will not store them before i free up some space.

This even if i got 100GB free space left (75% free).
Thanks given by:
#12
@OpenSource: I guess that's a 32-bit machine/OS, right?
Thanks given by:
#13
Correct.
But im not going to buy a new machine cos of that. This is something you guys need to fix. ;)
Thanks given by:
#14
Thought we fixed that already? I spotted that the code doing the space check was subject to 32-bit truncation if compiled on a 32-bit platform, however since that part is Linux-specific (am on Windows) I couldn't double-check/build the fix so I drew tempest's attention to that... but now I see the fix wasn't commited yet? In any case I can see no reason this won't be fixed for the next release.

EDIT: for now, there's a crude workaround Linux servers owners can use: use up or free up around 100 meg of disk space; the nature of the bug means that for every 4 gig of disk space, there's a 50 meg region that will trigger the error.
Thanks given by:
#15
Maybe its fixed in SVN.
But this is on 1.1.0.4.

To always keep an eye out for disk use and keep it under 25% sucks.
Cant keep buying new external HDD's just to have my internal drive under 25% use.
Thanks given by:
#16
@GeneralDisarray: we did, but i didn't remember to commit it for some reason. And now that I had the opportunity, I asked, just to be on the safe side :)

@OS: will be committed... right now.
EDIT: Done, could you test it?
Thanks given by:
#17
Which level of logging (-LF switch) makes the server log kill messages, connects and disconnects with their times and time played?

As I asked before, if demos fail to save, they don't get saved and don't take up space (yay)?

Thanks :)
Thanks given by:
#18
I'll have to do some research for your first question, but for your second there are two possible answers since I'm not sure what you mean...

First:
If the logging indicates "demo discarded" (the logging message upon a demo too short) that would mean they are deleted and do not take up space.

Second: If they just fail to save in general then I would definitely assume they are not saved. xD kinda obvious if you think about it lol.
Thanks given by:
#19
(02 May 11, 06:45PM)SiL3nT Wrote: Which level of logging (-LF switch) makes the server log kill messages, connects and disconnects with their times and time played?
-LF2
Quote:As I asked before, if demos fail to save, they don't get saved and don't take up space (yay)?
Viper's right; is this even a question?
Just remove the -W switch and recording of demos won't be an issue for you.
Thanks given by:
#20
what actions is showed by viewing verbose log?
Thanks given by:
#21
The only extra actions logged are the teamplay messages:
  • defended the flag
  • covered the flag stealer
  • covered the flag keeper
It also gives you some more info at server startup:
  • Which config files were read (maprot,blacklist,etc.)
  • Lists of all the blacklist entries (IP, nickname and forbidden word) and any errors in the config files.
  • Number of demos held in RAM.
  • Whether demos are permanantly recorded, and where.
  • The vote and map permission strings.
  • The server description and any custom server description settings.
  • The maximum number of clients.
  • The kick and ban thresholds.
  • The masterserver it's connecting to.
  • The admin passwords, in an obscured form.
If you have it in debug logging mode, you also see:
  • How each client voted.
  • Uplink quality statistics.
  • Something about 'flagaction' which I've never asked about.
Not exhaustive; I may have missed something.
Thanks given by:
#22
I'm interested about flagaction too...

I personally run verbose mode on my servers since it gives you much more info on the actual "running" of your server.

Oh and YMH|Fiz (acRunner :D) says he's gonna try some new tricks with map popularity statistics based on voting info. In case you were interested, it sounded cool.
Thanks given by: