MemoryGauge Coming soon

A see-through server memory gauge for admins, with alerts when memory runs high or keeps creeping up.

Carbon Oxide v0.4.2 Updated

Overview

A Rust server's memory climbs over a wipe as the world fills, and it rarely hands any back; the usual end is the host stopping the process when it runs out. MemoryGauge gives you warning first: how close the server is to its limit, whether it is still climbing once start-up has settled, how fast, and when it would reach the limit at that rate.

The gauge

Each admin can switch on a small see-through gauge in a corner of their own screen: memory in use against the limit, a bar, a sparkline of the last hour (or 6 or 24), the trend and the time to the limit, plus heap, garbage collections, server fps and entities.

The panel

/mg opens a panel with every figure and chart tabs for memory and the managed heap, CPU, hitches (the longest frame each minute), entities, players and network. Hover a bar to see its value and the time it covers. It reads what kind of growth you have (the world filling up, the managed heap, which points to a plugin, or native memory) and what helps, lists recent alerts with what caused each, and has a Run GC button (two clicks, since a collection stalls the server). The last 24 hours of readings and alerts are kept on disk, so the charts survive a restart.

Alerts
  • WATCH — memory at 75% of the limit, or climbing faster than 50 MB an hour
  • ALARM — memory at 90%, or on course to reach the limit within 6 hours
  • Hitches — a single frame over 500 ms, naming the plugins busiest in that second
  • Low fps — server fps below 15 for 30 seconds

Alerts go to admins in chat (with a toast at ALARM), the server log, logs/MemoryGauge/ and, if you set one, a Discord webhook. Every threshold is in the config. Set the memory limit to your host's limit: otherwise the machine's RAM is used, and a rented server can see more than it may use.

It only watches and alerts. The one thing it will do to the server is a garbage collection, when an admin asks for one. Seven bundled languages, each admin served their own.

Every download is licensed to you and watermarked with your details.

Features

  • See-through corner gauge with sparkline and time to the limit
  • WATCH and ALARM alerts on high or creeping memory
  • Hitch alerts that name the busiest plugins
  • Panel charts for memory, CPU, hitches, entities, players and network
  • Tells you what kind of growth it is and what helps
  • 24 hours of history kept across restarts
  • Discord webhook alerts
  • Seven bundled languages

Install

  1. Download MemoryGauge.cs from My Plugins.
  2. Drop it into oxide/plugins or carbon/plugins.
  3. Grant the permission:
o.grant group admin memorygauge.admin

The file name must stay MemoryGauge.cs — Oxide matches it to the class name.

Then set Memory limit (MB, 0 = the machine's RAM; set your host's limit) in the config to your host's memory limit.

Config

{
  "Memory limit (MB, 0 = the machine's RAM; set your host's limit)": 0,
  "WATCH at this percent of the limit": 75.0,
  "ALARM at this percent of the limit": 90.0,
  "Minutes after start-up before the trend is judged": 60,
  "Hours of history the trend is worked out over": 3.0,
  "WATCH when climbing faster than (MB an hour)": 50.0,
  "ALARM when on course to reach the limit within (hours)": 6.0,
  "Minutes a lower level must hold before the alert is cleared": 20,
  "Repeat an ALARM every (minutes, 0 = never)": 30,
  "Repeat a WATCH every (minutes, 0 = never)": 120,
  "Alert on a single frame longer than (ms, 0 = off)": 500,
  "Minutes between hitch alerts": 15,
  "Alert when server fps stays below (0 = off)": 15,
  "Seconds fps must stay low before alerting": 30,
  "Minutes between low fps alerts": 15,
  "Alerts in admins' chat": true,
  "Toast admins on ALARM": true,
  "Discord webhook URL for alerts (empty = off)": "",
  "Hours of history kept": 24
}

Commands & Permissions

Commands

Chat (/memorygauge works too)

  • /mg — open the panel
  • /mg on|off — switch the corner gauge on or off
  • /mg corner <topleft|topright|bottomleft|bottomright|center> — move the gauge
  • /mg gc — run a garbage collection and report what it freed
  • /mg status — one-line summary
  • /mg plugins — the busiest plugins in the last minute

Console / RCON

  • memorygauge.status (one line, handy from RCON), memorygauge.plugins, memorygauge.gc
  • memorygauge.open, memorygauge.toggle, memorygauge.corner <corner> — bindable

Permissions

  • memorygauge.admin — the gauge, the panel, alerts and every command

Changelog

VersionReleasedChanges
v0.4.2 latest

First release on this store.