• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Mut: Per Server Stats

regarding bUploadAllStats, is it supposed to happen right away upon joining the server ?

I've enabled DebugDatabase and I can see its connecting fine, when game ends my stat file is saved on ftp but I there is no indication its trying to migrate all the stats

Using a Linux kf server and proftpd locally. I'm not sure if this is supposed to work as forrestmark9 mentionned it didnt earlier but since I wasn't having the exact same issue...

Any ideas ?

EDIT: After spending a whole night tuning timeouts (notransfer, stalled and timeout) and the keepalive value in serverperks, the further I got was wave 9 until I started getting FTP Timeout and sometimes when it does it wipes the player stat file on the ftp (so next time player reconnects he starts at 0). However, no signs of bUploadAllStats trying to upload any other stats but that I can manage to reformat the original ini but is there anyone willing to share his FTP server parameters ? Because clearly default settings on a modern ftpd are not suitable.

Also, just to make sure I'm understand the following correctly:

If you want to upload onto FTP current stats saved on server, enable following setting on ServerPerks.ini: bUploadAllStats=True. Then start game on solo and wait for it to finish uploading everything.

Starting a game in solo... does it mean I have to use my kf client somehow ? Otherwise how do I solo on a dedicated server ? I just join and play as usual right and by "wait for it to finish" it means I have to stay alive ?
 
Last edited:
Upvote 0
After numerous attempts and the lack of success stories of people in the same situation, I had to face the fact that the FTP database just doesn't play well with linux KF server (server crashing, wiping player stats).

Since the two servers I run are in the same VPS and same filesystem, I thought of just making a symbolic link to ServerPerksStat.ini. The only downside I noticed is that data isn't written to disk immediatly when the messages *Saving 1 stats object* shown in the logs, meaning players have to wait a few minutes before switching servers to avoid losing any progress.

Other than the very occasional moment where both servers will attempt to write in the file at the same time, should I be worried about anything else ? Is this an horribly bad practice ?
 
Last edited:
Upvote 0
After numerous attempts and the lack of success stories of people in the same situation, I had to face the fact that the FTP database just doesn't play well with linux KF server (server crashing, wiping player stats).

Since the two servers I run are in the same VPS and same filesystem, I thought of just making a symbolic link to ServerPerksStat.ini. The only downside I noticed is that data isn't written to disk immediatly when the messages *Saving 1 stats object* shown in the logs, meaning players have to wait a few minutes before switching servers to avoid losing any progress.

Other than the very occasional moment where both servers will attempt to write in the file at the same time, should I be worried about anything else ? Is this an horribly bad practice ?

Use a hard link to ServerPerksStat.ini instead of symbolic link. If you are using symbolic link, then ucc may cache the entire file and overwrite any other data changed by other servers.
IMO using hard links is the best way to share perk stats between multiple servers, if they all are running on the same Linux machine.
If you saving stats at the end of every wave, then player risk of loosing only last wave's stats (if left mid-wave) when joining to another server - not a big deal at all.
 
Upvote 0
In theory it should work through Dropbox. You could test it and find out. Since it's just a basic text file, you should be able to host it anywhere.

**Edit: Setting up news has been on my to do list for a while now. I might try it tomorrow, since it's about time I do it anyway. I'll test it through dropbox first since it's quicker than FTP.

**Edit #2: Nevermind, confirmed it works through dropbox.
 
Last edited:
Upvote 0
Hello Marco, I've been using your serverperks for a year or two now like a lot of others, they have always work real well for me mate great job. May I ask a question about Version 7.00 for some reason I can't edit the server perks setting via KF web admin, i.e. there's no Perks in the Defaults list to click on is this a bug or have you changed how it works? I have to edit them via the ServerPerks.ini because its just not editable on KF web admin which it was on V6.0,6.1,6.5, which seem real odd to me any ideas?

EDITED: Just notices you do it via being login has admin in the game, god I feel a right fool for asking now. lol
 
Last edited:
Upvote 0
Question? So in what format does server perks v7 save the stats in via FTP? Data.ini or serverperkstats.ini?

Also Marco, if you have time, yes please could you add a conversion to take Data.ini and turn the perks back to serverperkstats.ini that would be awesome. :)

Wondering about this, since I have found that the Data.ini seems to have a limit on how much data can be saved per player. I thought it was a perk limit, but it seems as each player has a set amount of characters/numbers that can be saved per each player. Once it is hit, the player will freeze the server when the stats try to save and cause the server to restart. I don't mind using the remote database system, Data.ini file, not sure if it would be possible to increase the amount of characters/numbers that can be saved per player. I would rather use the remote system if all possible, not sure how well the FTP would work, and also the security of it. Plus, moving to FTP, i would have to redo sever perks, since I'm running 6.01 as I have added and modded it over time. Which I may update in time for the news tabs and such, unless I can find time to find all the source and code that has been added and add it to my modded 6.01 version. Ok, I'm starting to ramble...

Thank you again for server perks mod Marco, and if you could do one or both of the above, add the conversion to change Data.ini to serverperkstats.ini and also if possible add or allow more characters/numbers to be saved per player/steamid in the Data.ini file. I hate asking for stuff, because I'm sure your a busy person, as I am as well. But, my hands are tied on this one it seems.

Thank you,
Guardian :)
 
Upvote 0
The FTP server saves each persons stats in a .txt with there SteamID as the name. So you'll probably get alot of .txt files


Oh wow :eek: that would be a little crazy... Each of my data.ini files are pushing 7000 entries each. So, the FTP is a no go for certain. Unless it is a last option, but I'll work around it as much as possible for sure. Hopefully Marco can increase or make the data.ini file not have any limits on player saved data. Keeping fingers crossed :s

Thank you Forrestmark for letting me know on the FTP saving style.
 
Last edited:
Upvote 0
Use a hard link to ServerPerksStat.ini instead of symbolic link. If you are using symbolic link, then ucc may cache the entire file and overwrite any other data changed by other servers.
IMO using hard links is the best way to share perk stats between multiple servers, if they all are running on the same Linux machine.
If you saving stats at the end of every wave, then player risk of loosing only last wave's stats (if left mid-wave) when joining to another server - not a big deal at all.

I've been tinkering with that, but what I've noticed is that the game doesn't re-read the stats file, say I've been to server A, made +1 headshot, went to server B made another headshot for a total of 2, now if I go back to server A, I'd still have only one headshot, even though in the ServerPerkStats.ini it says 2 headshots. This always happens unless I restart the server.

I run a script that restarts empty servers if someone joined in previously, but it's not enough to prevent any progress loss.

Is there something I could be missing ? At first I thought it had something to do with how modern unix filesystem deal with access time now that relatime is the default, reverting back to atime didn't change anything :(
 
Last edited:
Upvote 0