From 38720806ebc7cf74b676c0ad7a4a55c31acd432c Mon Sep 17 00:00:00 2001 From: chenx221 Date: Mon, 15 Apr 2024 16:41:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8linux=E4=B8=8A?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E8=B4=9F=E8=BD=BD=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/admin/sysinfo.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/views/admin/sysinfo.php b/views/admin/sysinfo.php index 7769fda..257d7a5 100644 --- a/views/admin/sysinfo.php +++ b/views/admin/sysinfo.php @@ -1,4 +1,4 @@ -title = '系统信息';
- osType === 2): ?> + osType === 1): ?>

@@ -312,8 +312,8 @@ if(needLoadGraph !== null){ }, yAxis: { type: 'value', - min: 0, - max: 100 + min: 0 + // max: 100 }, series: [ { @@ -322,7 +322,7 @@ if(needLoadGraph !== null){ label: { show: true, position: 'top', - formatter: '{c}%' + formatter: '{c}' }, emphasis: { label: { From 83c68999e543b6f8e33b8eac7485b477f3177fd6 Mon Sep 17 00:00:00 2001 From: chenx221 Date: Mon, 15 Apr 2024 16:42:56 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=8E=B7=E5=8F=96=E9=80=9F=E7=8E=87=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E7=9A=84=E6=8F=90=E7=A4=BA=E6=96=87=E6=9C=AC=20*linux?= =?UTF-8?q?=E8=BF=99=E8=BE=B9=E6=B5=8B=E8=AF=95200~300ms=E5=B0=B1=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=AE=8C=E6=88=90=E4=B8=80=E6=AC=A1=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/js/sysinfo-core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/js/sysinfo-core.js b/web/js/sysinfo-core.js index fbdfca5..bb6fdc8 100644 --- a/web/js/sysinfo-core.js +++ b/web/js/sysinfo-core.js @@ -1,5 +1,5 @@ //dynamic fetch of system information & display -//every 5 seconds ajax request to fetch system information +//every * seconds ajax request to fetch system information //backport: admin/get-sysinfo //return json object with system information @@ -8,7 +8,7 @@ var sysinfo = { setInterval(sysinfo.fetch, 2000); // WARNING // For Windows users, the interval should be equal or greater than 1500ms, because the system information gathering process is slow. (Please dynamically adjust the interval based on system performance.) - // For Linux users, the interval can be set to below 1000ms. + // For Linux users, the interval can be set to 500ms (Recommend: 1000ms) }, fetch: function () { $.ajax({ From 34cb3ae2b924dd0fa8a9d59e85b6a4ff0a2e4c02 Mon Sep 17 00:00:00 2001 From: chenx221 Date: Mon, 15 Apr 2024 16:43:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E5=86=85=E5=AD=98=E5=8D=95=E4=BD=8D=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20=E8=B0=83=E6=95=B4load=E4=BF=9D=E7=95=99?= =?UTF-8?q?=E4=B8=A4=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; }