Qilan2 commited on
Commit
81b21bc
·
verified ·
1 Parent(s): ae151d6

Update server10v.py

Browse files
Files changed (1) hide show
  1. server10v.py +2 -1
server10v.py CHANGED
@@ -505,7 +505,8 @@ def check_system_resources():
505
  memory_usage = memory.percent
506
 
507
  # 检查CPU和内存占用是否超过85%
508
- if cpu_usage >= 90 or memory_usage >= 90:
 
509
  print("占用过高")
510
  # 可选:打印具体的使用率
511
  print(f"CPU使用率: {cpu_usage}%")
 
505
  memory_usage = memory.percent
506
 
507
  # 检查CPU和内存占用是否超过85%
508
+ if cpu_usage >= 90:
509
+ # if cpu_usage >= 90 or memory_usage >= 90:
510
  print("占用过高")
511
  # 可选:打印具体的使用率
512
  print(f"CPU使用率: {cpu_usage}%")