Guest User

123

a guest
Mar 19th, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. import os
  4.  
  5. command_result1 = os.popen("nvidia-smi -q -d TEMPERATURE | grep Gpu | cut -c35-50")
  6. command_result2 = os.popen("nvclock -i | grep 'Fanspeed'")
  7.  
  8. for row1 in command_result1:
  9. result1 = []
  10.  
  11. for row2 in command_result2:
  12. result2 = []
  13.  
  14. tempGPU = row1.split(" ")
  15. fan_speed = row2.split(":")
  16.  
  17. new_speed = int(tempGPU[0]) * 2 - 90
  18.  
  19. fan_speed = fan_speed[1].split(".")
  20. fan_speed = fan_speed[0].strip()
Advertisement
Add Comment
Please, Sign In to add comment