Qilan2 commited on
Commit
d521223
·
verified ·
1 Parent(s): 29a65fb

Update server10.py

Browse files
Files changed (1) hide show
  1. server10.py +1 -1
server10.py CHANGED
@@ -492,7 +492,7 @@ def check_system_resources():
492
  memory_usage = memory.percent
493
 
494
  # 检查CPU和内存占用是否超过85%
495
- if cpu_usage >= 85 or memory_usage >= 85:
496
  print("占用过高")
497
  # 可选:打印具体的使用率
498
  print(f"CPU使用率: {cpu_usage}%")
 
492
  memory_usage = memory.percent
493
 
494
  # 检查CPU和内存占用是否超过85%
495
+ if cpu_usage >= 90 or memory_usage >= 90:
496
  print("占用过高")
497
  # 可选:打印具体的使用率
498
  print(f"CPU使用率: {cpu_usage}%")