mirror of
https://github.com/wekan/wekan.git
synced 2026-11-07 11:02:33 -05:00
The RAM and Disk usage pages were designs that no code carried out. Both monitors now run beside the CPU one and, like it, record only the start and the end of a sustained high-usage period: - Memory: RAM from /proc/meminfo's MemAvailable - os.freemem() is MemFree, which counts the page cache as used and shows a healthy server as full - and swap, which alone also starts a period. Without /proc/meminfo it uses what Node reports. Settings WEKAN_RAM_* and WEKAN_SWAP_HIGH_PERCENT. - Disk: each filesystem WeKan writes to - the files root, its temp directory for uploads and the snap's data directory - measured once per device, with an episode of its own. WEKAN_DISK_WATCH_PATHS replaces the paths. - Each report has a live line above its rows and a URL (/admin/problems/ram, /admin/problems/disk). The menu and titles use the existing memory-usage and sandstorm-disk-usage keys, which every language translates, and the Summary names the cpu, ram and disk streams. Observe and report only, as designed. The three monitors share one event recorder (server/lib/resourceLog.js) and one intEnv (models/lib/intEnv.js), which three files had each defined. The pure halves are tested without Meteor, and resourceMonitorsWiring checks the wiring and that no copy of either shared piece returns. Thanks to xet7 !
10 lines
385 B
JavaScript
10 lines
385 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: 'DiskBleed', source: 'diskMonitor',
|
|
});
|
|
|
|
export default { record };
|