Results 1 to 4 of 4

Thread: Purpose of sms_stats_data File?

  1. #1
    Kart Driver
    Join Date
    May 2015
    Posts
    77

    Purpose of sms_stats_data File?

    My server I rent kept crashing right after I tried to join it.

    Couldn't locate the problem until I noticed that the "sms_stats_data.json" file was nearing half a gig (if not more).

    I deleted the file and now all is working as it did before.

    A couple of questions:

    1. What good is the file? I've seen no one use it. It's got information in it, but needs organizing.

    2. I know you can turn this feature off in the "server.cfg" file, but is there any way to have it rewrite the file instead of append? Or at least rewrite the file once it gets to a certain size.

    I know for certain that because the data file ballooned to an enormous size, it caused my server to crash. Once I deleted it, all was fine (no other conclusion to draw).

  2. #2
    WMD Member
    Join Date
    Jan 2012
    Location
    Brasília, Brasil
    Posts
    107
    Platform
    PC
    The purpose is quite clear: Tracks the info from the players, sessions and server while it's running.

    And it's explained on the sms_stats.lua file:

    Stats tracking addon.

    The stats are stored persistently in the data and therefore survive server restarts. The persistent storage
    available as sms_stats global in Lua. Other addons can therefore read and use it - but they should not modify it.
    The sms_stats table has these sub-tables:

    1. server
    - name: Current server name
    - uptime: Current server uptime, in seconds
    - total_uptime: Total server uptime, in seconds
    - steam_disconnects: Number of times disconnected from Steam
    - steam_downtime: Current number of seconds while disconnected from Steam, out of the "uptime" seconds
    - total_steam_downtime: Total number of seconds while disconnected from Steam, out of the "total_uptime" seconds

    2. session
    - counts: Various counters for
    - sessions: Number of sessions started on the server
    - lobbies: Number of lobbies started on the server (unlike sessions, returning back after race counts as another lobby)
    - stage_counts: Table with practice1, practice2, qualifying, warmup, race1: Number of race stages started
    - stage_durations: Table with practice1, practice2, qualifying, warmup, race1: Total playtime durations in seconds of individual stages.
    If a race is setup with stages but the session is quit before the stage is reached, that stage will not be counted here
    - race_loads: Lobby->loading transitions
    - race_loads_done: Loading->race transitions
    - race_finishes: Final race stage done, if lower than loads, those sessions ended prematurely
    - player_loads: Number of players during lobby->loading transitions
    - player_loads_done: Number of players during loading->race transitions (lower than loads -> disconnects while loading)
    - player_finishes: Number of players when the race finished (lower than finishes -> early leaves or disconnects during race)
    - tracks: Map from track id to the number of times the track was active while loading
    - track_distances: Map from track id to the number of meters travelled on the (over all player participants)
    - vehicles: Map from vehicle id to the number of times the vehicle was used while loading ; TODO: does not count JIP yet
    - vehicle_distances: Map from vehicle id to the number of meters travelled in the vehicle (updated each lap)

    3. players: Map from player SteamID to
    - name: Last known Steam name
    - last_joined: Unix UTC time in seconds of the last time the player joined the server
    - counts: Various counters for
    - race_joins: Number of times joined the server
    - race_loads: Number of lobby->loading transitions
    - race_loads_done: Number of loading->race transitions
    - race_finishes: Number of fully finished races
    - tracks: Map from track id to the number of times the player loaded onto this track ; TODO: does not count JIP
    - track_distances: Map from track id to the number of meters the player travelled on this track (updated each lap)
    - vehicles: Map from vehicle id to the number of times the player loaded in this vehicle ; TODO: does not count JIP
    - vehicle_distances: Map from vehicle id to the number of meters the player travelled in the vehicle (updated each lap)
    - qualify: Table with counters for qualification results of the player:
    - states: Map from state name at the end of qualification to counter for that state
    - positions: Map from qualifying positions to counter for that position
    - positions_per_size: Map from number of players at the end of qualifycation, to map from qualifying positions to counters
    - race: Table with counters for race results of the player:
    - states, positions, positions_per_size: Same as the qualification table

    4. history: Array with games ran on the server.
    For now the addon does not perform any cleanup of this array, all sessions will be stored here.
    Each element of the array is a structure containing:
    - start_time: Unix UTC timestamp when the lobby for the game was created.
    - end_time: Unix UTC timestamp when the game finished.
    - finished: True if the game fully finished and loaded back to lobby, false if the game finished prematurely.
    - setup: Setup attributes of the game, recorded when it starts loading. All writable attributes are stored here.
    - members: Members of the session, map from refid to:
    - index, steamid, name: Basic member details
    - join_time: Time when the member joined the session.
    - leave_time: Time when the member left the session.
    - participantid: Id of the member's player participant.
    - setup: Member's attributes VehicleId, LiveryId, RaceStatFlags
    - participants: Participants who were present during this session, map from participant id to structure with these attributes:
    RefId, Name, IsPlayer, VehicleId, LiveryId
    - stages: Map from stage name to structure with the stage details:
    - start_time, end_time: Start and end time.
    - events: Array of participant events related to the stage. Each event has 'event_name', 'time', 'participantid' and 'attributes'
    with the event details, as well as 'name', 'refid' and 'is_player' with useful participant details.
    Events that are recorded here are: Lap, State, Impact, CutTrackStart, CutTrackEnd.
    - results: Array of Results events, each with 'time', 'participantid' and 'attributes' ; and 'name', 'refid' and 'is_player'.
    As for question number 1:
    You can use it to view the data/info after several sessions happened.
    It's also for leagues and private races to be have some important info from what happened on a peticular race (players, lap times, position) stored.

    The Json file which is generated is quite easy to read from.

    For number 2, you probably need to edit the addon to be able to do this. Or ask Stepan if he can put those as a config.
    Last edited by erickgoldner; 13-10-2015 at 13:46.

  3. #3
    Kart Driver
    Join Date
    May 2015
    Posts
    77

    As for question number 1:
    You can use it to view the data/info after several sessions happened.
    It's also for leagues and private races to be have some important info from what happened on a peticular race (players, lap times, position) stored.

    The Json file which is generated is quite easy to read from.

    For number 2, you probably need to edit the addon to be able to do this. Or ask Stepan if he can put those as a config.
    Quite easy to read from yes. But it's all in parts spread out all over the place, and without any way to organize the information is useless, unless you want to spend half your life reading through it and taking notes.

    The best thing to do, I think, is disable it. The file got so big that the server wouldn't even stay up, but kept going off line.

    Without a way to easily organize it, the file is worthless, like a majority of the information coming from online sessions.

  4. #4
    Kart Driver ichigobankai09's Avatar
    Join Date
    May 2015
    Posts
    35
    Platform
    PC
    Disable it if your not specifically using it, that is the point of an add-on. Stepan did warn of it getting large and that if you want to and to keep an eye on it.
    clanAOD.net : clean drivers, clean races, 4-5 weekly leagues, 350 man teamspeak.
    AOD Season 2-3:
    Team Owner of Ketsugetsu Racing
    clanAOD.net DS soon to run a RackService Server

Similar Threads

  1. I JUST DRIFTED A CATERHAM ON PURPOSE!!!!!
    By agentbeef in forum Project CARS on Xbox One
    Replies: 25
    Last Post: 28-06-2015, 14:11
  2. bgl file for bug report
    By Jens Schmitt in forum PC - Technical Help & Support
    Replies: 0
    Last Post: 17-06-2015, 18:08
  3. Try turning Android Cardboard as pCARS VR purpose
    By PowderGuy in forum General Discussion
    Replies: 5
    Last Post: 10-06-2015, 09:41
  4. Update file?
    By IceCain in forum PS4 - Technical Help & Support
    Replies: 12
    Last Post: 23-05-2015, 17:44
  5. Everything's super but... No purpose of playing it?
    By RwVision in forum General Discussion
    Replies: 96
    Last Post: 14-05-2015, 22:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •