From 34cb3ae2b924dd0fa8a9d59e85b6a4ff0a2e4c02 Mon Sep 17 00:00:00 2001 From: chenx221 Date: Mon, 15 Apr 2024 16:43:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=90=E8=A1=8C=E5=86=85?= =?UTF-8?q?=E5=AD=98=E5=8D=95=E4=BD=8D=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20=E8=B0=83=E6=95=B4load=E4=BF=9D=E7=95=99=E4=B8=A4?= =?UTF-8?q?=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/SystemInfoHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/SystemInfoHelper.php b/utils/SystemInfoHelper.php index c425ace..0b87ac4 100644 --- a/utils/SystemInfoHelper.php +++ b/utils/SystemInfoHelper.php @@ -159,7 +159,7 @@ class SystemInfoHelper $this->ram = FileSizeHelper::formatBytes($computer->TotalPhysicalMemory); } } else { - $this->ram = FileSizeHelper::formatBytes(intval(shell_exec("grep MemTotal /proc/meminfo | awk '{print $2}'"))); + $this->ram = FileSizeHelper::formatBytes(intval(shell_exec("grep MemTotal /proc/meminfo | awk '{print $2}'"))*1024); } if ($this->EnableTimeRecords) { $this->timeRecords['detectRam'] = microtime(true) - $start; @@ -239,7 +239,7 @@ class SystemInfoHelper if ($this->EnableTimeRecords) { $start = microtime(true); } - $this->load = sys_getloadavg()[0]; + $this->load = round(sys_getloadavg()[0],2); if ($this->EnableTimeRecords) { $this->timeRecords['detectLoad'] = microtime(true) - $start; }