Drek282/PsychoStats

Stats not updating after original parse

Closed this issue · 17 comments

After the initial install and running stats.pl, the stats are no longer updating. I have a scheduled task to run once a day at 9 AM. The task runs (see log) but new players are not being added...

errlog.txt

Hlstatsx:
2023-05-01_091903

Psychostats:
2023-05-01_092106

Hlstatsx:
2023-05-01_091930

Psychostats:
2023-05-01_092022

2023-05-01_092158

Can you send the server logs you've collected since the last batch you sent me please, to the same email address.

I have another question. Are you tracking by steam id, or player name?

Also please check that your "ranking" numbers aren't set too high.

It's obvious that the stats are updating. The question is why those two players aren't appearing in the stats. One played 18 min, and one played 14 min. The most obvious answer is that your ranking conditions are set too high. The other possible answer is that you are tracking players by player name, not steam id. Tracking by player name can be extremely unreliable.

Another possibility is the minimum connected players setting, or the max days settings.

Here's the setting:
2023-05-01_130201

Logs sent.

You can't have zeroes (by design) there for player ranking. Increase those numbers.

You can't have zeroes (by design) there for player ranking. Increase those numbers.

I never adjusted them. What would be a good value?

I think those default numbers work. I don't think that's the problem.

The max inactivity is low. Try setting that to the same as max days. I would also set min connected to 2. When you do that you will need to reset your stats and regenerate them.

The max days and max inactivity really depends on how active the clients on your server are. You might want to try setting max days to something like 56 (8 weeks) and max inactivity to the same (56). I would also consider changing the exclusive option to yes.

Found the culprit. Not sure why I got this error "Unable to find log" because the log was there (although it was 0kb).
I removed all 0kb logs from the directory, reset the stats and ran the stats again. Seems okay now.

`PsychoStats version 3.2 (rev 564)
Packaged on Mon May 1 14:03:00 2023
Perl version 5.24.3 (MSWin32)
Loaded Modules:
DBD::mysql v4.033
DBI v1.636

[INFO] PsychoStats v3.2 initialized.
336 logs found in D:\server\counter-strike source\cstrike\logs
[WARNING] Unable to find log l0630002.log from previous state in \server\counter-strike source\cstrike\logs. Ignoring directory.
[INFO] Daily updates about to be performed: maxdays,decay,activity,players,clans,ranks,awards
[INFO] Daily 'maxdays' process running (Last updated: Mon May 1 14:00:07 2023)
Deleting stale stats older than 2023-03-30 ...
Recalculating compiled stats ...
This may take several minutes ...
[INFO] Daily process completed: 'maxdays' (Time elapsed: 00:00)
[INFO] Daily 'decay' process skipped, decay is disabled.
[INFO] Daily 'activity' process running (Last updated: Mon May 1 14:00:07 2023)
[INFO] Daily process completed: 'activity' (Time elapsed: 00:00)
[INFO] Daily 'players' process running (Last updated: Mon May 1 14:00:07 2023)
[INFO] Daily process completed: 'players' (Time elapsed: 00:00)
[INFO] Daily 'clans' process running (Last updated: Mon May 1 14:00:07 2023)
[INFO] Daily process completed: 'clans' (Time elapsed: 00:00)
[INFO] Daily 'ranks' process running (Last updated: Mon May 1 14:00:07 2023)
[INFO] Daily process completed: 'ranks' (Time elapsed: 00:00)
[INFO] Daily 'awards' process running (Last updated: Mon May 1 13:47:23 2023)
[INFO] No historical stats available. Aborting award calculations.
[INFO] PsychoStats v3.2 exiting (elapsed: 00:00:00, logs: 0, lines: 0)`

You might have had corrupted log files for some reason, files that PS couldn't open. Perhaps related to the server mods you are running. I'm going to close this because I don't think this is an issue with PS.

@bobl61 Received the logs. Thank you. I'm going to reopen this and see if there is something that can be done so that the stats script can handle corrupted files without breaking.

Run 'stats.pl -verbose' or 'stats.pl -debug' to get more info from the script until this is resolved.

@Rosenstein Probably doesn't need to worry about that at this point. I'm pretty sure I know what the issue is, and he sent me the logs, including the corrupted logs, so I'll be able to run my own tests. The root of the problem is some kind of server instability which is resulting in the malformed logs, but the script should be able to deal with files it can't open.

In the meantime he can delete the empty files. That might actually be a solution, having the script do that. We'll see.

No ETA on this at this time.

@bobl61 Received the logs. Thank you. I'm going to reopen this and see if there is something that can be done so that the stats script can handle corrupted files without breaking.

Sounds good.

I think the stats script can already handle corrupted files. This is just a guess, but I suspect @bobl61 that you combined logs from a previous server and then tried to update the logs. PS processes logs in date/time order, so if you add earlier logs after you run an update, and those logs are from a previous date/time, those logs won't get processed.

In that case you need to reset the stats and run stats.pl again. When I did that everything was fine.

I consider this issue closed.