QStat reference
QStat is an open source command-line program that retrieves and displays information from game servers that have implemented a game server query protocol. It supports reporting information such as the state of the game server, the server name, the map name, the number of connected players, the ping response time, game server rules, and player information.
The basic syntax for QStat is qstat [options] [-f file] [-of | -af output-file] [-server-option host[:port]]
.
General variables
Variable | Description |
---|---|
| Output the web address of the QStat home page. |
| Output the version of QStat being run. |
| Output the name of the QStat programmer. |
| Output the email address of the QStat programmer. |
| Enable HTML friendly string output. Server results may include characters that have special meaning in HTML. These are replaced by equivalent SGML entities. QStat converts '<', '>', and '&' to ' |
| Convert line feeds and carriage returns into spaces. Applies to all variables that output strings. Use this variable after in the header template. |
| Allow spaces in rule names. Use this variable after in the header template. |
| Conditional output. If the variable option is "true," the template is output up to a matching |
| Conditional output. Same as |
| End conditional output. There must be one |
| Output the current local time. |
| The total number of servers to be queried. |
| The number of servers up and running. |
| The number of servers either DOWN or TIMEOUT. |
| The number of players found on all servers. |
| The sum of the maximum player values for all servers. |
| The ratio of |
| Ignore the next newline. Not really a variable, but a way to curtail the output of extra newlines. Saves space in the output while the template remains readable. Must be the last thing on the line. |
| The full name of the default server type specified with |
Server variables
Variable | Description |
---|---|
| Output the hostname of the server if known, otherwise the server address as given to QStat. |
| Output the name of the server. |
| The time in milliseconds to get a response from the server. If the server is DOWN or TIMEOUT, nothing is output. |
| The number of players on the server. |
| The maximum number of players allowed on the server. |
| The name of the map being played. |
| The name of the game being played. This is usually the name of the "mod" run by the server. |
| The number of retries needed to get the server status. This is a measure of packet loss. |
| The IP address of the server. Doesn't include the port number. |
| The port the server is running on. |
| The server address as given to QStat. |
| The server's type string (refer to Game options table.) |
| The server's type prefix (same as |
| The value of a server rule. If the rule isn't returned by the server, nothing is output. Must be used with the |
| Output all the server rules in the format name=value separated by commas. Must be used with the |
| Invoke the player template. The player template is output after for each player on the server. Must be used with the |
| Invoke the rule template. The rule template is output after for each server rule. |
Player variables
Variable | Description |
---|---|
| The name of the player. If |
| The name of the player with HTML color font tags. Only Quake 3 and Tribes 2 are supported. |
| The number of frags scored. |
| The name of the player's mesh (model). This value is only available from Unreal servers. |
| The name of the player's face texture. This value is only available from Unreal version 405+ servers. |
| The player's global statistics ID. This value is only available from Unreal Tournament 2003 servers. |
| Display |
| Display |
| Display |
Rule variables
Variable | Description |
---|---|
| The server rule name. |
| The server rule value. |
Conditional options
Option | Description |
---|---|
| True if the server is running a "mod." |
| True if the server has one or more players. |
| True if the server is running Unreal. |
| True if the rule name is set on the server. Server rule names can include any alpha-numeric character plus '*', '_', or '.'. If |
| True if the flag |
| True if the server is up and running. |
| True if the server is known to be not running. This is true if the server computer returns an ICMP indicating that nothing is running on the port. Only supported by some operating systems. |
| True if the server never responded to a status query. |
| True if the host name lookup failed. |
| True if the server has no players. |
| True if this is a master server. |
| True if the server has the maximum players. |
| True if the player is a team. Only available with Tribes and Tribes 2 servers. Only applies to the player template. |
| True if the player is a bot. Only available with Tribes 2 servers. Only applies to the player template. |
| True if the player is using an alias. Only available with Tribes 2 servers. Only applies to the player template. |
| True if the player has a tribe tag. Only available with Tribes 2 servers. Only applies to the player template. |
| True if the rule name matches the variable argument. For example, |
| True if the rule value matches the variable argument. For example, |
| True if the player has recorded DEATHS in Descent 3 or if the player is dead in Ghost Recon. NOTE if the Ghost Recon player has spawns available they can go from dead to alive. |
Info options
Option | Description |
---|---|
| Fetch and display server rules. |
| Fetch and display player information. |
Display options
Option | Description |
---|---|
| Write output to file instead of |
| Like |
| Only display hosts that are up and running a game server. Doesn't affect template output. |
| Don't display full servers. Doesn't affect template output. |
| Don't display empty servers. Doesn't affect template output. |
| Don't display the header line (doesn't apply to raw or template output). |
| Perform name transforms. Transform game-specific player and server name escape sequences into more readable text. This setting is ON by default. |
| No name transforms. Don't transform player and server names. Option |
| Display time in clock format ( |
| Display time in stop-watch format ( |
| Display time in seconds. This is the default for |
| Sort servers and/or players. Servers and players are sorted according to
The 'l' (ell) sort key displays servers in the order they were provided to QStat. For example, the order in which they're listed in the command-line or in a file. The 'l' sort key can't be combined with other server sort keys, but it can be combined with player sort keys. If the 'l' sort key is used with other sort keys, then the 'l' sort key is ignored. |
| Display player names in hex. |
| Display data in "raw" mode. The argument to Server rules are displayed on one line as |
| Output server information wrapped in XML tags. |
| Use the UTF-8 character encoding for XML output. |
| Always display the game port in QStat output. If the query port was different from the game port, then the query port will be saved in the |
| Display errors. |
| Enable debug options. By default, it enables printing of all received packets to |
Search options
Option | Description |
---|---|
| Resolve IP addresses to hostnames. Use with caution as many game servers don't have registered hostnames. QStat may take up to a minute to timeout on each unregistered IP address. The duration of the timeout is controlled by your operating system. Names are resolved before trying to query any servers. |
| Cache hostname and IP address resolutions in A host cache file should not be shared by QStat programs running at the same time. If you run several QStats at the same time, each should have its own cache file. |
| Interval in seconds between server retries. Specify as a floating-point number. The default interval is 0.5 seconds. This option doesn't apply to master servers (refer to |
| Interval in seconds between master server retries. Specify as a floating-point number. The default interval is 2 seconds. |
| The number of retries. QStat will send this many packets to a host before considering it non-responsive. The default is 3 retries. |
| The number of simultaneous servers to query. Unix systems have an operating system-imposed limit on the number of open sockets per process. This limit varies between 32 and 100 depending on the platform. These limits can be increased by minor changes to the code, but the change is different for each platform. The default is 20 simultaneous queries. This option may be abbreviated |
| Total run time in seconds before giving up. The default is no timeout. |
Network options
Option | Description |
---|---|
| Specify the source ports for sending packets. The ports can be a single number or a range. A range is two numbers separated by a dash ('-'). The numbers should be positive and less than 65535. Use this option to get through a firewall that has source port restrictions. Set |
| Specify a local IP address from which to send packets. This is useful on machines that have multiple IP addresses where the receiver checks the source IP of a packet. Normally this option is never needed. |