Skip to content

10% off shop orders, applied at checkoutBlack Friday: 30% off until Dec 1Server templatesServer templates

RPScripts

How to Use Resmon to Diagnose FiveM Client Scripts

By Luke

Screenshot of the FiveM Resmon Console
On this page

Resmon shows client resource execution cost and memory signals. Use it to identify a script worth investigating, then reproduce the same action with the profiler. It does not measure server database time, download speed or total GPU rendering cost.

These Resmon steps target FiveM on GTA V Legacy; before using them on an Enhanced server, check Cfx.re’s Legacy-to-Enhanced changes.

Open and close the monitor

Join your development server, open F8 and run:

resmon true

If the command is restricted, use a permitted development client as described in the official client-console reference. Do not bypass a public server’s restrictions. To hide the monitor:

resmon false

resmon is a true/false client setting, and the FiveM source also accepts a number: resmon 1 opens the monitor and resmon 0 closes it, the same as true and false. If the console answers Access denied for command resmon, the client is not running in developer mode. The console reference lists how to enable it; on FiveM for GTAV Enhanced the server has to set sv_devMode true.

How to read the resmon columns

The Resource Monitor window lists one row per client resource below a [Total CPU] row. Based on the FiveM client source, the columns mean:

  • CPU msec: the average time the resource’s own code ran per tick, in milliseconds, with a small graph of recent ticks.
  • Time %: the resource’s share of all script time. In the [Total CPU] row, it is total script time as a share of the frame time.
  • CPU (inclusive): like CPU msec, but including the time of other resources that ran while it was active, for example through an export call.
  • Memory: memory reported by the resource’s script runtimes. A ? means no value was reported.
  • Streaming: memory of the game assets the resource’s scripts have loaded and still hold, such as requested models. A resource that only streams map files may show nothing here.

The monitor colours both CPU columns: green below 1 ms, shifting through yellow to red at 8 ms or more. Separately, the client shows a “Resource time warning” when a resource averages more than 6 ms, with an estimate of the FPS it costs at 60 Hz. These are the client’s display rules, not a performance budget published by Cfx.re. A high Streaming value points to assets the scripts keep loaded rather than to slow code.

Make a useful comparison

  1. Record the client settings, server population, location and resource versions. Begin with a quiet idle scene.
  2. Perform one repeatable action: open a menu, use a job interaction or enter a vehicle. Note which resource’s timing changes and whether the cost continues after the action ends.
  3. Repeat the action several times. A short initialization spike has a different cause from continuous idle work.
  4. On staging, change or stop one suspected resource after checking its dependencies, then repeat the same route and action.
  5. Keep logs and before/after measurements. Retest a reconnect and full restart before deploying a change.

Investigate the code behind the number

Use the Cfx.re profiler to locate the costly script path. Check repeated NUI messages, unnecessary polling and repeated work inside loops. Increase waits only when the task does not require per-frame execution.

If scripts look inexpensive but FPS remains low, inspect rendering settings, streamed assets and GPU pressure separately. To measure the frame rate itself while you repeat the route, show the FiveM FPS counter. For heavy map interiors, see FiveM MLO optimization.

How should I compare script performance before buying?

Compare the same action, location and client settings. An idle resource-monitor value says little about a busy server. Ask for the test conditions behind a benchmark and inspect profiler traces before replacing a resource solely for a lower advertised number.

Cfx.re profiler documentation

  • How to Fix “FXServer Is Not Responding” in txAdmin

    How to Fix “FXServer Is Not Responding” in txAdmin

    “FXServer is not responding” means txAdmin’s monitor cannot obtain the expected response from the game server. Check whether FXServer is running, listening at the configured endpoint and able to finish startup before changing firewall or resource settings.

  • How to Find and Read txAdmin Logs

    How to Find and Read txAdmin Logs

    Use txAdmin’s FXServer console output for resource errors and its administrative action log for staff actions. Record the incident time and active profile first so you search the correct server and log generation.