Qilan2 commited on
Commit
dbe9853
·
verified ·
1 Parent(s): e440bdb

Update server10.py

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