Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- import os
- command_result1 = os.popen("nvidia-smi -q -d TEMPERATURE | grep Gpu | cut -c35-50")
- command_result2 = os.popen("nvclock -i | grep 'Fanspeed'")
- for row1 in command_result1:
- result1 = []
- for row2 in command_result2:
- result2 = []
- tempGPU = row1.split(" ")
- fan_speed = row2.split(":")
- new_speed = int(tempGPU[0]) * 2 - 90
- fan_speed = fan_speed[1].split(".")
- fan_speed = fan_speed[0].strip()
Advertisement
Add Comment
Please, Sign In to add comment