Z-Pulse

Trusted Free Z-Pulse 1.1.1

This resource is free
en-z-pulse.jpg


Z-Pulse — the pulse of your server: measured lag instead of "it feels laggy"​

Demo
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

Z-Pulse times every server tick and turns it into facts: average updates per second, worst tick, number of stalls by threshold, and a daily plain-text report that says hour by hour when the server paused and for how long. With the freeze probe (on by default; the other investigation tools are off by default), it also names what was probably blocking it.

It is built to cost (almost) nothing: a monitor that slows the server down would measure its own presence. On a normal tick it only does arithmetic; the rest happens once per measurement window, and files are written off the game thread. If an ARK update breaks one of its hooks, Z-Pulse says so in its log and stays loaded.


Upgrading from 1.0.x — read this first
  • Back up your current config.json before you update.
  • config.json now holds the settings only. The sentences of the daily report are in the lang folder (en.json, fr.json, de.json, es.json, 68 sentences each) and your own changes go in lang\custom.json (never shipped, never overwritten). Z-Pulse has no text shown to players in the game: these sentences are only those of the daily report file.
  • The old Texts block of your config.json (the report texts that 1.0.x added at first load) is no longer read. If you had changed a sentence there, copy it into lang\custom.json under its language and its new key, like Report.Footer (format shown under "Configuration and texts"), or the report will use the shipped sentence. Sentences you never changed need nothing. With Z-ARK, this is done for you at install.
  • The plugin no longer writes to config.json, and no longer converts old setting names by itself: use the names of config.commented.json.
  • New setting General.SamplerHz: 0 samples only during pauses. Its shipped value is 10, the same behaviour as 1.0.x, so nothing changes for you unless you choose 0. If it is missing from your config.json, the plugin uses 10. See "The stack sampler, pauses only" below.
  • The files read by programs (pulse.json, pulse-histo.jsonl, probe.jsonl, pulse-piles.jsonl...), every RCON reply and every log line are unchanged.
  • Step by step, with and without Z-ARK: see "Updates" at the end.


Install
Drop the Z-Pulse folder into ShooterGame/Binaries/Win64/ArkApi/Plugins/. Requires AsaApi 2.11 or newer. Loads at server start.


RCON commands
  • ZPulse.Status — current window and last complete window, settings; it ends with the texts loaded, for example texts: lang EN FR DE ES, plus , custom FR:2 when custom.json holds texts (language:number).
  • ZPulse.Reload — re-reads config.json and the lang folder (window length, thresholds, report language and sentences, sampler); the Watch* switches need a server restart. It answers "settings reloaded (ACTIVE, window 30s, ...)", or "reload failed, previous settings still in place" if config.json cannot be read.
  • ZPulse.Census — counts dinos and structures, awake or in stasis, with the top awake classes.
  • ZPulse.Probe — state of the freeze probe and of its hooks.
  • ZPulse.WakeAt <x> <y> <z> [radius] — wakes what is in stasis around a point, like a player arriving, to reproduce a freeze on demand. A test tool: use it on a test server first.


Configure (config.json)
config.json holds the settings only; it never contains a sentence. Every setting is explained in config.commented.json, which comes with the plugin: read it before you change anything.
  • General.Enabled — false puts the plugin to sleep without unloading it (apply with ZPulse.Reload).
  • General.Language — language of the daily report: EN, FR, DE or ES, or a language you add yourself (see below). Shipped: EN.
  • General.DailyReport — the daily text report (on by default).
  • General.DetailThresholdMs / MaxDetailsPerWindow — ticks slower than this are listed in each window (defaults 500 ms and 40; MaxDetailsPerWindow range 0 to 500).
  • Window.Seconds — length of a measurement window (10 to 3600).
  • Probe — the freeze probe: Enabled, ThresholdMs, ArrivalThresholdMs, SlowBlueprintMs, BlueprintDetail, SummaryEverySeconds, MaxFileMB. On by default: it times stasis wake-ups, player arrivals, saves and slow Blueprint calls, and names the slow ones (class, mod, owner, position); its file is capped at Probe.MaxFileMB.
  • The diagnostics and the sampler settings are listed in the two chapters above.

Optional diagnostics (all OFF by default)
Turn them on while you are hunting a lag problem (the freeze probe described above is the exception: it is on by default):
  • WatchLoading, WatchEngineStages, WatchRPC (+ RpcThresholdMs) — name the blocked engine stage and the slow network call behind a pause. These hooks are placed when the server starts: restart it after enabling them.
  • CaptureContext — context of a slow cryo capture.
  • ActorCensus (+ CensusEverySeconds) — which creatures are awake and keep the server busy.
  • TraceTeleports — teleports around a pause.
  • StackSampler (+ SamplerHz, PauseSamplerHz, PauseSamplerAfterMs, MaxFrames) — samples the game thread to show the share of time spent in each plugin. See the next chapter.

The stack sampler, pauses only
The stack sampler (General.StackSampler, off by default) looks at what the game thread is doing, many times a second, to show which plugin or engine function holds it. Its settings, all in General:
  • StackSampler — true turns it on. Off by default.
  • SamplerHz — samples per second in normal times, 0 to 50. Shipped: 10. 0 is new in 1.1.0: no sample at all in normal times.
  • PauseSamplerHz — samples per second while a pause is under way, 10 to 200. Shipped: 50.
  • PauseSamplerAfterMs — a pause is sampled faster once it has lasted this many milliseconds, 50 to 60000. Shipped: 500. When SamplerHz is 0, it is capped at 1000: the plugin lowers a larger value to 1000.
  • MaxFrames — most stack frames kept per sample, 8 to 128. Shipped: 48.

SamplerHz = 0, "pauses only". The game thread is never paused by the sampler in normal times. A background thread just looks, every 100 ms, whether the current game tick has already lasted PauseSamplerAfterMs. Only then does it sample, at PauseSamplerHz, until the pause ends. So you keep the main use of the sampler (naming what holds the game thread during a stall) with no sample while the server runs smoothly. The price: outside pauses nothing is sampled, so the per-plugin time table of the daily report only describes what was seen during pauses. With SamplerHz at 1 or more, the sampler works as before. Remember the "Known limit" at the end of this page: the sampler is meant for short investigations.

ZPulse.Reload applies these settings and tells you the mode: "stack sampler ON during pauses only", "stack sampler ON 10 Hz" or "stack sampler off".


Configuration and texts
What lives where
  • config.json — the settings. You edit it. The plugin never writes to it.
  • config.commented.json — the same settings with an explanation for each one. Shipped with the plugin, replaced at each update. Read it, do not edit it, do not rename it to config.json (it contains comments).
  • lang\en.json, fr.json, de.json, es.json — the 68 sentences of the daily report, shipped with the plugin and replaced at each update: do not edit them.
  • lang\custom.json — YOUR sentences. Never shipped, never overwritten by an update.

Only the daily report is translated. Z-Pulse shows nothing to players in the game. RCON replies and log lines stay in English: they are tool messages, not report texts. The sentences have keys with a dot, like Report.Title, Hours.ColTps, Pauses.Help or Report.Footer: open en.json to see them all.

Change a sentence. Create lang\custom.json, then run ZPulse.Reload. Example:
JSON:
{
  "EN": {
    "Report.Footer": "Z-Pulse only measures; it changes nothing on the server. Questions: ask the admin team."
  },
  "FR": {
    "Report.NoData": "Pas encore de mesure pour ce jour."
  }
}
A key you leave out keeps the shipped text.

The codes %s, %d, %.1f... Many sentences contain codes such as %s (a word), %d (a whole number), %.1f (a number with one decimal) or %lld. The plugin replaces them with the real values. In your sentence, keep the same codes, in the same order, as in en.json. A sentence whose codes differ from the English one is refused: English is used for that sentence and the log names the key. Example with Report.Average, whose English text is Average: %.1f game updates per second over %d h %02d min measured.
  • Accepted: Mean: %.1f updates per second over %d h %02d min. (same codes, same order, other words).
  • Refused: Average: %d updates per second over %d h %02d min. (%d instead of %.1f, so English is used and a warning is written to the log).
To write a real percent sign, type %%.

Which language is used? The report is written in General.Language. For a sentence, the plugin looks in this order: custom.json in that language, the shipped file of that language, custom.json in English, en.json, then the English text built into the plugin. The report never has an empty line.

Add a language (for example Dutch): create lang\nl.json (a code of 2 or 3 letters) with the same keys as en.json and the same % codes, or write an "NL" block in custom.json, then write NL in General.Language.

A file that cannot be read (invalid JSON) is ignored with a warning in the log; nothing is written. The report sentences are read at start and at ZPulse.Reload: after a change, run ZPulse.Reload.


Compatibility
ARK: Survival Ascended dedicated servers on Windows. Requires AsaApi 2.11 or newer.


External connections and data
  • No network connection. The plugin opens no connection of its own and sends nothing anywhere: no web request, no telemetry, no licence check, no update check. WatchRPC times the game's own traffic from players; it opens nothing.
  • Files written, all in its own folder. Always: pulse.json, pulse-histo.jsonl (rotated), pulse-report-<date>.txt (14 days kept) with pulse-report-state.json, and pulse-battement.json, a heartbeat refreshed every few seconds by a background thread (time of the last tick, process id, committed memory), so that an external tool can tell a frozen server from a busy one. Only when you turn the matching tool on: probe.jsonl (slow wake-ups: class, mod, tribe id, owner name, position, name of the nearest player), pulse-piles.jsonl (stack samples: module names and offsets), pulse-recensement.jsonl (creature counts), pulse-receptions.jsonl (slow network receptions, with the sending player's EOS id and name). It never writes config.json or the files in lang.
  • Files read: its own config.json, the files in lang (report sentences), and AsaApi's own offset cache (each game function is looked up there before a hook is placed). It also reads the server process's own memory counters.
  • The stack sampler, explained (StackSampler, off by default). To show which plugin or engine function holds the game thread during a stall, a background thread of Z-Pulse briefly pauses the server's own game thread (SuspendThread), reads its registers (GetThreadContext), copies the top of its stack (256 KB at most) and resumes it (ResumeThread): 10 times per second by default, 50 during a stall; with SamplerHz at 0, only during a stall. The copy is decoded afterwards, while the game runs, against the modules loaded in the server process (EnumProcessModules) and their unwind tables. Only module names and offsets are kept. For safety it also uses OpenThread and NtQueryInformationThread (to locate the game thread's stack), LdrRegisterDllNotification (no sample for 5 minutes after any DLL loads or unloads, because plugins place or remove hooks then), a memory-locked buffer (VirtualLock, with the process's working set raised to match) so that the copy never waits on the disk, and a watchdog thread that resumes the game thread if a pause ever lasts over one second, then switches the sampler off. Debuggers and profilers use the same calls, so a security tool may flag them: here they only ever target the server's own game thread, inside its own process.
  • When WatchEngineStages, WatchRPC or the probe's Blueprint detail is on, Z-Pulse pins itself in memory (GetModuleHandleEx): a hot reload cannot unload it, and an update waits for a server restart.
  • No registry access, no external program started, no other data collected.

What it writes (in its own folder)
  • pulse.json — the last measurement window (Window.Seconds, 30 s by default): ticks, average, worst, stalls.
  • pulse-histo.jsonl — every window, one line each (rotated), for graphs.
  • pulse-report-<date>.txt — the daily report, readable by anyone: summary, hour-by-hour table (TPS, players, pauses of 1 s / 3 s, worst stall), the longest pauses, with the engine stage and the probable cause when the investigation tools are on. Rewritten every 10 minutes, 14 days kept. Language: EN, FR, DE or ES, or one you add.
  • Optional diagnostics, only when you turn them on: probe.jsonl (freeze probe), stack samples, creature census, slow network receptions.


Dependencies and limitations
  • No required dependency. Z-ARK, if you use it, reads Z-Pulse's files to draw graphs; the daily text report works without it.
  • Always on: one hook on the game-mode tick (AShooterGameMode.Tick). The investigation tools add their own hooks, placed at server start: restart after switching a Watch* setting.
  • ZPulse.WakeAt changes the game state (it wakes what is in stasis around a point): try it on a test server first.
  • Known limit of the stack sampler: if another plugin places or removes a hook at the exact moment of a sample (a window of a few microseconds, outside the 5-minute quiet periods), the server could freeze. Unlikely, not impossible: that is why the sampler is off by default and meant for short investigations. With SamplerHz at 0 it samples far less often, only during pauses.


Updates
Z-ARK (server manager, https://z-ark.fr/en/) checks for new versions of this plugin and installs them from its dashboard; it also draws Z-Pulse's measurements as graphs. With Z-ARK 0.285.0 or newer, install the update from Z-ARK: it keeps your settings, moves the sentences you had changed in the old config.json into lang\custom.json, removes the old keys that are no longer used after a safety copy, and lists everything in the update report.

Without Z-ARK: click Watch at the top of this page to be notified of every new version; what changed is listed in the Updates tab. Coming from 1.0.x, step by step:
1. Back up the Z-Pulse plugin folder.
2. Stop the server.
3. Replace the plugin's .dll, PluginInfo.json and config.commented.json, and the lang folder except lang\custom.json (if you have one).
4. Keep your config.json. The plugin starts with it, reads the settings, and ignores the old Texts block that is still in it (the report uses the shipped sentences). Those old keys have no effect and can be deleted.
5. Copy the sentences you had changed in the old Texts block into lang\custom.json, under their language and their new key (format above).
6. Compare your config.json with the one shipped, to see if a setting is new. (From 1.0.x, the new one is General.SamplerHz; if it is missing the plugin uses 10, the same as before.)
7. Start the server and run ZPulse.Status: it should end with texts: lang EN FR DE ES (and custom with your languages if you wrote sentences).


Support
A question, a bug, an idea? Post it in the Discussion tab of this page, or use the form at https://z-ark.fr/en/plugin-support/ (no account needed). Please give the plugin version, your AsaApi version and what you saw. Z-ARK users can also write to us from Settings > Support in Z-ARK.


Built with AI, knowingly
This plugin was written with an artificial intelligence, and we would rather say it plainly. It is not code thrown together at random: behind it is someone from the trade (software development, server operations, community management) who decides every feature, reviews it and puts it to the test on a real cluster, with real players, before it reaches you. The same goes for the ZMenu client mod. Bugs reported in the Discussion tab get fixed.
Author
Zarkk
Downloads
339
Views
1,881
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Zarkk

  • Z-ARK
    Free + paid Z-ARK
    Free server manager for ARK: Survival Ascended: start, update, back up, restart, watch your cluster.
  • Z-Colour
    Free Z-Colour
    Players recolour their tamed dinos with one chat command. Open by default, console friendly.
  • Z-Messages
    Free Z-Messages
    Welcome message, timed announcements and one style sheet for our plugins' messages.
  • Z-Info
    Free Z-Info
    /info in game: the server's real rates, breeding settings and our commands available on this map.
  • Z-Points
    Free Z-Points
    Spend level-up points in bulk: accelerating clicks and /zp. Server-side, console friendly.

Latest updates

  1. 1.1.1

    FIXED Package refreshed: the previous file was out of date and now declares AsaApi 2.11 as minimum.
  2. 1.1.0

    IMPORTANT, read before you install: the architecture of this plugin has been reworked and its...
  3. 1.0.2 - probe fix

    Fixes the stall probe staying off on ARK 97 (it stopped reading the offset cache too early)...
Back
Top