Skip to content

xHLDS commands

The console commands xHLDS adds to ReHLDS, in plain words, with their arguments.

xHLDS version
3.15.0-hs.9
Updated

The console commands xHLDS adds on top of ReHLDS. Type them on the server console, or send them over rcon (rcon xhlds_stats). ReHLDS's own commands are in the ReHLDS reference. New to these words? The glossary explains them.

xhlds_license

Shows the state of this server's xHLDS licence, and loads a renewed licence file without a restart.

Since: xHLDS 3.15.0-hs.5.

Values: xhlds_license [reload]. Without an argument: the licence the server runs on, the address and port it covers, and when it expires. reload: reads xhlds.lic again now and says whether the new file is used or why not.

Technical details: A licence is for one server, that is one IP address and port, and comes as a file, xhlds.lic, in the server directory next to hlds_linux (or the path given with -license). The server does not run without a valid one. The server warns you before the licence expires.

To renew, put the new xhlds.lic in place and run xhlds_license reload. The server keeps running, and a new file never stops it. If the server's IP or port changes, the licence is reissued for the new one.

The command works from the server console or over rcon. The paid licence is for servers hosted elsewhere; on Hostsrc CS 1.6 servers xHLDS is free. Licence requests go to alex@hostsrc.com.

xhlds_api_incidents

Shows how often plugins or the game made each kind of mistake xhlds_api_guard handles, since the server started and on the current map.

Since: xHLDS 3.15.0-hs.6.

Values: xhlds_api_incidents, with no arguments.

Technical details: One row per kind of mistake: how many in total, how many on this map, how many the server recovered from and how many stopped it, and where the last one came from (<module>+0x<offset>) and how long ago. If there were none, it says so.

Use it to see whether a mistake keeps coming back, then look at the API misuse: lines on the console and the AMX Mod X error log of the same moment to find the plugin.

xhlds_confilter

Controls the console filter, which hides console lines you never want to see, such as a plugin's debug output or a warning the server repeats all day.

Since: xHLDS 3.15.0-hs.6.

Values: xhlds_confilter [status|reload|enable|disable|test <text>]. status (or nothing): whether the filter is on, the rules file and when it was loaded, and for each rule how many lines it hid and when it last did. reload: reads the rules file again and resets the counts. enable and disable: turn the filter on or off (xhlds_confilter_enable). test <text>: says which rule would hide that line, without counting it.

Technical details: You write the rules in xhlds_confilter.txt in the server directory, next to hlds_linux (or the file given with -confilter). It is read when the server starts and again with xhlds_confilter reload. Without the file nothing is hidden. One rule per line:

  • text or contains:text hides lines that contain this text anywhere. Upper and lower case count.
  • glob:pattern hides lines that match the whole pattern, where * stands for any text and ? for one character. glob:[MyPlugin] * hides lines starting with [MyPlugin] .
  • A line starting with # is a comment. A bad line is reported with its line number and skipped; the other rules still work.

Check a rule with xhlds_confilter test <a line> before you load it. Be careful with broad rules such as glob:*WARNING*: they also hide the server's own warnings.

What it covers: the server console, qconsole.log and log lines echoed on the console. The log files only with xhlds_confilter_logs 1. Never rcon replies: an rcon tool always gets the whole answer. Never crash reports: they keep every line. Lines about a fatal error and the filter's own lines are always printed. At each map change, if the filter hid anything, one line says how much, for example xhlds_confilter: hid 1520 lines (2 rules) since the last map.

A few lines are not filtered: the first lines at start-up, before the rules are read, and lines that go straight to the terminal, such as Dropped <player> from server and what Steam prints itself. The command works over rcon, and its own output is never filtered.

xhlds_explain

Explains a console code such as XH-D01: what it means, whether it is a problem and what to do.

Since: xHLDS 3.15.0-hs.9.

Values: xhlds_explain [code]. With a code: the explanation of that code; XH-D01, xh-d01 and D01 all work. Without a code: the list of codes.

Technical details: Some xHLDS console lines start with a code in brackets, for example [XH-D01]. The first time a code is printed after the server starts, its line ends with (xhlds_explain XH-D01: what it means, what to do). The codes so far are XH-D01, XH-D02, XH-T01, XH-T02 and XH-T03. The command works over rcon.

xhlds_crashtest

Crashes the server on purpose, so you can check that a crash report is written and, if you set it up, sent.

Since: xHLDS 3.15.0-hs.6.

Values: xhlds_crashtest, with no arguments. It exists only when the server was started with -crashtest.

Technical details: The server really crashes: everyone on it is disconnected, and it restarts as after any crash. Run it on a test server or when nobody is playing. The console prints xhlds_crashtest: crashing the server on purpose just before.

Because the command exists only with -crashtest, nobody can crash a normal server with it over rcon.

xhlds_stats

Shows how evenly the server runs its frames, how each player's connection is doing, and where the frame time goes.

Since: xHLDS 3.15.0-hs.2.

Values: xhlds_stats [players|profile] [now] [json]. No argument: frame rate, frame times, the gaps between frames as percentiles, and late frames for the last complete window. players: one row per player instead. profile: where the frame time went. now: the window in progress so far, instead of the last complete one. json: the same as one line of JSON.

Technical details: A window is xhlds_stats_window seconds long. The frame report also has a line with the frames over the frame budget set by sys_ticrate, and whether late frames came from a frame's own work or from the time between frames. The frame that loads a map is left out.

xhlds_stats players shows each player's name, round trip, loss each way, choke, rate, update rate, packets a second, dropped data and overflows. With json it prints one line per player, short enough for one rcon reply.

Both reports end with a short summary for owners: what players missed while they were connected, by kind (Missed data: 6 players missed 420 messages (effects 200, sounds 150, ...); the XH-D01 and XH-D02 lines say who), and the players who timed out, by what they were doing (Timeouts: 5 (2 while connecting, 2 while loading the map, 1 in game); the XH-T lines say who). In the players table a timeout shows as timeout (while loading the map).

xhlds_stats profile shows, for each part of the frame and each game function, the time per frame and its share of the budget, and the longest late frames with what ran before them, including the player command behind one when a command took long, for example command "say". Only the command's first word is shown, never chat text or arguments; for dlfile, a player downloading a file from the game server instead of the FastDL address in sv_downloadurl, it also names the file. How much detail depends on xhlds_stats_profile.

It measures in every -pingboost mode and doesn't change how the server runs, apart from the small time measuring takes. To compare servers or start options, run it for the same time with players on each. Plugins can read the same values from xhlds_stats_json, xhlds_stats_players_json and xhlds_stats_profile_json.

Licences, prices and what xHLDS adds: xHLDS licence and prices.

Something wrong or unclear on this page? Email office@hostsrc.com or tell us on Discord (external site, opens in a new tab).