MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / systemInfoReport

Function systemInfoReport

daemon/src/service/log.ts:66–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64}
65
66function systemInfoReport() {
67 const MB_SIZE = 1024 * 1024;
68 const info = systemInfo();
69
70 const self = process.memoryUsage();
71 const sysInfo =
72 `MEM: ${toInt((info.totalmem - info.freemem) / MB_SIZE)}MB/${toInt(
73 info.totalmem / MB_SIZE
74 )}MB` + ` CPU: ${toInt(info.cpuUsage * 100)}%`;
75 const selfInfo = `Heap: ${toInt(self.heapUsed / MB_SIZE)}MB/${toInt(self.heapTotal / MB_SIZE)}MB`;
76 const selfInfo2 = `RSS: ${toInt(self.rss / MB_SIZE)}MB`;
77 const logTip = $t("TXT_CODE_app.sysinfo");
78 loggerSysInfo.info([`[${logTip}]`, sysInfo, selfInfo, selfInfo2].join(" "));
79}
80
81setInterval(systemInfoReport, 1000 * 5);
82

Callers

nothing calls this directly

Calls 4

$tFunction · 0.90
systemInfoFunction · 0.85
toIntFunction · 0.85
infoMethod · 0.80

Tested by

no test coverage detected