Difference between revisions of "Live Stats"
Line 4: | Line 4: | ||
* Service Id | * Service Id | ||
* Online (1/0) | * Online (1/0) | ||
+ | * Process ID | ||
+ | * Bandwidth (bytes) | ||
+ | * CPU (%) | ||
+ | * Memory (bytes) | ||
* Game | * Game | ||
* Game type | * Game type | ||
Line 15: | Line 19: | ||
* Rules in XML format | * Rules in XML format | ||
* Query time (UTC/GMT) | * Query time (UTC/GMT) | ||
− | |||
− | |||
− | |||
− | |||
For example you can get a list of services that are currently running with this query: | For example you can get a list of services that are currently running with this query: | ||
<source lang="sql">SELECT a.ip_address, a.game_port, b.* FROM tc_game_services a, tc_game_service_live_stats b WHERE online = 1 AND a.service_id = b.service_id;</source> | <source lang="sql">SELECT a.ip_address, a.game_port, b.* FROM tc_game_services a, tc_game_service_live_stats b WHERE online = 1 AND a.service_id = b.service_id;</source> |
Revision as of 18:22, 18 July 2011
Every time the game monitors queries a service the stats are saved to the table named tc_game_service_live_stats. You can use this table to create a list of services on your website with their current status.
Information currently available in the table:
- Service Id
- Online (1/0)
- Process ID
- Bandwidth (bytes)
- CPU (%)
- Memory (bytes)
- Game
- Game type
- Map
- Name
- Html name
- Max players
- Number of current players
- Number of current spectators
- Player details in XML format
- Rules in XML format
- Query time (UTC/GMT)
For example you can get a list of services that are currently running with this query:
SELECT a.ip_address, a.game_port, b.* FROM tc_game_services a, tc_game_service_live_stats b WHERE online = 1 AND a.service_id = b.service_id;