mirror of
https://github.com/wekan/wekan.git
synced 2026-11-20 09:45:04 -05:00
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 !
10 lines
403 B
JavaScript
10 lines
403 B
JavaScript
// WeKan CPU-usage event logger (Admin Panel → Problems → CPU usage): the start
|
|
// and end of each sustained high-CPU period, through server/lib/resourceLog.js.
|
|
import { resourceRecorder } from '/server/lib/resourceLog';
|
|
|
|
export const record = resourceRecorder({
|
|
stream: 'cpu', category: 'cpu', bleed: 'HighCpuUsage', legacyBleed: 'CpuBleed', source: 'cpuMonitor',
|
|
});
|
|
|
|
export default { record };
|