← Back to home@tcgbp

dsh-flash-mem-mon

No description

Stars
0
Language
JavaScript
Created
Oct 6, 2026
Updated
Oct 6, 2026
GitHub repo

Introduction

dsh-flash-mem-mon

Memory monitor provider for dock-flash — registers a host-memory-alert provider (RSS absolute thresholds, RSS growth rate, Major GC frequency) via ctx.get('dockFlashAlerts') and exposes /memory-trend for trend sparklines.

Installation

dsh plugin --profile <profile> add dsh-flash-mem-mon

Requires dock-flash >=1.6.0 (provides dockFlashAlerts and quickControl services).

Configuration

All settings are live-editable (volatile) and take effect immediately:

SettingDefaultDescription
memThresholdInfo256 MBRSS info threshold
memThresholdWarning512 MBRSS warning threshold
memThresholdError1024 MBRSS error threshold
memThresholdCritical1536 MBRSS critical threshold
memPollBase30000 msBase polling interval
memPollMin2000 msMinimum polling interval
gcThresholdInfo2 /minMajor GC info threshold
gcThresholdWarning5 /minMajor GC warning threshold
gcThresholdError10 /minMajor GC error threshold

Architecture

This is a companion plugin following the same two-half pattern as dsh-flash-net-mon:

  • Host half (src/index.ts → tsc → dist/index.js): Memory trend ring buffer, GC observer, /memory-trend HTTP route
  • Client half (lib/client.js): Alert provider, enable toggle, config modal with sparkline, i18n

License

Apache-2.0