Files
wekan/server/lib/diskLog.js
T
Lauri Ojansivu cfd9a62466 Swap alone is not high RAM usage, and resource monitors are not named like vulnerabilities.
A developer laptop with many programs open showed in Admin Panel /
Problems / Memory usage: "RamBleed, high, high RAM usage started
(>= 90%): RAM 16.1/30.9 GB (52%), swap 18.7/30.9 GB (60%)". Swap at or
above 25% started a high-memory period by itself, made it high severity,
and the text still said ">= 90%". Idle pages in swap while RAM is free
are not pressure.

- Swap now counts only while RAM is also at or above the low threshold
  (80%), and a period ends when RAM is back under it.
- The start row says what started it: (RAM >= 90%) or (swap >= 25% with
  RAM >= 80%). Only RAM at 95% or more is high severity.
- The RAM, CPU, disk and speed monitors named their rows like Hall of
  Fame entries (RamBleed, CpuBleed, DiskBleed, SlowBleed) with CWE-400.
  They are HighRamUsage, HighCpuUsage, HighDiskUsage and SlowRequest now,
  without a CWE, and stored rows are renamed once at startup.

tests/ramHighTracker.test.cjs replays the laptop's numbers as a
negative case; tests/resourceStreamNames.test.cjs pins the names.

Thanks to xet7 !
2026-11-19 00:21:33 +02:00

10 lines
415 B
JavaScript

// WeKan disk-usage event logger (Admin Panel → Problems → Disk usage): the start
// and end of each filesystem's high-usage period, through server/lib/resourceLog.js.
import { resourceRecorder } from '/server/lib/resourceLog';
export const record = resourceRecorder({
stream: 'disk', category: 'disk', bleed: 'HighDiskUsage', legacyBleed: 'DiskBleed', source: 'diskMonitor',
});
export default { record };