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

Update server10v.py

Browse files
Files changed (1) hide show
  1. server10v.py +2 -2
server10v.py CHANGED
@@ -539,8 +539,8 @@ def check_system_resources():
539
  memory_usage = memory.percent
540
 
541
  # 检查CPU和内存占用是否超过85%
542
- if cpu_usage >= 90:
543
- # if cpu_usage >= 90 or memory_usage >= 90:
544
  print("占用过高")
545
  # 可选:打印具体的使用率
546
  print(f"CPU使用率: {cpu_usage}%")
 
539
  memory_usage = memory.percent
540
 
541
  # 检查CPU和内存占用是否超过85%
542
+ # if cpu_usage >= 90:
543
+ if cpu_usage >= 90 or memory_usage >= 95:
544
  print("占用过高")
545
  # 可选:打印具体的使用率
546
  print(f"CPU使用率: {cpu_usage}%")