Qilan2 commited on
Commit
46e33eb
·
verified ·
1 Parent(s): f135dd5

Update server11.py

Browse files
Files changed (1) hide show
  1. server11.py +2 -2
server11.py CHANGED
@@ -578,8 +578,8 @@ def check_system_resources():
578
  memory_usage = memory.percent
579
 
580
  # 检查CPU和内存占用是否超过85%
581
- if cpu_usage >= 90:
582
- # if cpu_usage >= 90 or memory_usage >= 90:
583
  print("占用过高")
584
  # 可选:打印具体的使用率
585
  print(f"CPU使用率: {cpu_usage}%")
 
578
  memory_usage = memory.percent
579
 
580
  # 检查CPU和内存占用是否超过85%
581
+ # if cpu_usage >= 90:
582
+ if cpu_usage >= 90 or memory_usage >= 95:
583
  print("占用过高")
584
  # 可选:打印具体的使用率
585
  print(f"CPU使用率: {cpu_usage}%")