delvin-fil

аналог lm_sensors

Jan 12th, 2021
640
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!{}/usr/bin/env python3.8
  2. # -*- coding: utf-8 -*-
  3. import locale
  4. locale.setlocale(locale.LC_ALL, '')
  5. import psutil
  6.  
  7. tmp = round(psutil.sensors_temperatures()['coretemp'][0][1])
  8. if tmp > 80:
  9.     print (f"{tmp}° - ПРОЦ ХАНА!")
  10. else:
  11.     print (f"{tmp}° - ПРОЦ НОРМА!")
  12.  
  13. vga = round(psutil.sensors_temperatures()['radeon'][0][1])
  14. if vga > 80:
  15.     print (f"{vga}° - ВИДЯХА ХАНА!")
  16. else:
  17.     print (f"{vga}° - ВИДЯХА НОРМА!")
  18.  
  19. fan = psutil.sensors_fans()['it8720'][0][1]
  20.  
  21. if fan < 1000:
  22.     print (f"{fan} RPM - ВЕНТИЛЯТОР ХАНА!")
  23. else:
  24.     print (f"{fan} RPM - ВЕНТИЛЯТОР НОРМА!")
  25.  
RAW Paste Data