From 2e4fd493c526dc691056c1432a9c23c942d33716 Mon Sep 17 00:00:00 2001 From: snowykami Date: Thu, 3 Oct 2024 17:03:15 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E4=BF=AE=E5=A4=8DCPU=E7=89=A9?= =?UTF-8?q?=E7=90=86=E6=A0=B8=E5=BF=83=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ server_status/api.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 27ebebe..f540620 100644 --- a/.gitignore +++ b/.gitignore @@ -122,6 +122,8 @@ celerybeat.pid *.sage.py pdm.lock +start.cmd +start.sh # Environments .env diff --git a/server_status/api.py b/server_status/api.py index bc21e04..8ac7fcf 100644 --- a/server_status/api.py +++ b/server_status/api.py @@ -224,7 +224,7 @@ class Client: self.hardware.mem_used = psutil.virtual_memory().used self.hardware.swap_total = psutil.swap_memory().total self.hardware.swap_used = psutil.swap_memory().used - self.hardware.cpu_cores = psutil.cpu_count() + self.hardware.cpu_cores = psutil.cpu_count(logical=False) self.hardware.cpu_logics = psutil.cpu_count(logical=True) for part in psutil.disk_partitions(): try: