From 89a2f5b93683331bb50121fb45347c0b2d79b7d2 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Tue, 8 Feb 2022 13:05:10 +0900 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E8=BF=91=E3=82=B5=E3=83=BC=E3=83=90?= =?UTF-8?q?=E3=83=BC=E7=9B=A3=E8=A6=96=E3=81=8C=E5=8B=95=E3=81=8B=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20(#88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/server/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/server/index.ts b/src/modules/server/index.ts index 62be15a..fc9d84c 100644 --- a/src/modules/server/index.ts +++ b/src/modules/server/index.ts @@ -39,7 +39,7 @@ export default class extends Module { private check() { const average = (arr) => arr.reduce((a, b) => a + b) / arr.length; - const cpuPercentages = this.statsLogs.map(s => s && s.cpu_usage * 100 || 0); + const cpuPercentages = this.statsLogs.map(s => s && (s.cpu_usage || s.cpu) * 100 || 0); const cpuPercentage = average(cpuPercentages); if (cpuPercentage >= 70) { this.warn();