Live status for panels
Each server writes data/<server>/status.json, for panels and monitoring that read files rather than talk to the console. It's written when what it says changes, such as a player joining or leaving, the phase, the game or the queue, at most every 2 seconds, and at least once a minute while nothing does, so an idle server hardly touches the disk. dedicated status reads the same file, and takes a server whose file is older than 90 seconds, or gone, as not running.
data/<server>/status.json
{
"name": "Community Rotation",
"address": "203.0.113.4:49176",
"map": "Guardian",
"mode": "Slayer",
"state": "playing",
"players": [
{ "number": 1, "name": "Bravo", "id": "0123…cdef", "handle": "…", "address": "198.51.100.7:51234", "admin": false, "guests": ["Bravo 2"] }
],
"max_players": 16,
"pid": 4312,
"updated": 1793440610,
"reported": 3,
"game": 1,
"played": 4
}
stateislobby,voting,countdown,loading,playingorpost-game.- A player's
idis their network key, not the player ID their profile shows, andaddressis their address with its port. Tools written for 0.9 keyed on its player IDs and itsipfield need to change. guestsare the split-screen players at that PC: they count againstmax_players, and appear only there.updatedis Unix seconds,reportedhow many games this process reported to the stats service,gamethe playlist's game being played or waited for, from 0, andplayedhow many games this process started.updatedcan be up to 60 seconds old on a running server. A tool that took a status older than 30 seconds for a stopped server must now allow 90.- The file also carries the server's
phase(lobby,voting,countdown,loading,in_gameorpost_game) withphase_since, each player's role, who waits in the join queue asjoin_queue, andhealth: the version, uptime, players, frame rate and frame times over the last minute, upload and download, andmemory_mb. These are as fresh as the last write. healthalso has the ticks:ticks_per_secondplayed andgame_tick_rate, the share of frames that played no tick, one, or two and more, tick times (tick_ms_p50,tick_ms_p99,tick_ms_max), what each part of a frame takes (frame_area_ms),seconds_behind_last_minute,falling_behind, andeffective: the settings the server really runs with. Frames are not ticks: a busy server can play 30 frames a second at 60 ticks, two ticks a frame.memoryis the server's memory once its last game ended:resident_mib,this_game_mib,since_start_mib,engine_heap_mibandgames. It changes only when a game ends.botscounts bots apart from people. The people hold the places; a bot never does.- For live figures, ask the remote console's
health, or setmetrics_http = "127.0.0.1:9310"in a[[server]]:GET /healththen answers the same as JSON andGET /metricsas Prometheus text (reclaimer_frame_rate_hz,reclaimer_frame_ms_p99,reclaimer_players,reclaimer_ticks_per_second,reclaimer_falling_behind,reclaimer_memory_megabytesand more). It takes a loopback address only, since it has no password. - The player count a server advertises, in the Server Browser,
/healthand the console'sstatus, counts a connection that hasn't joined the game for 30 seconds only, so connections that never join don't make a server look fuller than it is.playersand this file still list every connection. - The file is replaced whole, so a reader never sees half of it.
