This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pynvml, time | |
from pynvml import * | |
TEMP_MIN_VALUE = 30.0 # fan is around 30% | |
TEMP_MAX_VALUE = 65.0 # fan is at 100% onwards | |
TEMP_RANGE = TEMP_MAX_VALUE - TEMP_MIN_VALUE | |
def fanspeed_from_t(t): | |
if t <= TEMP_MIN_VALUE: return 0.0 | |
if t >= TEMP_MAX_VALUE: return 1.0 | |
return (t - TEMP_MIN_VALUE) / TEMP_RANGE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# cool_gpu2.sh This script will enable or disable fixed gpu fan speed | |
# | |
# Description: A script to control GPU fan speed on headless (non-X) linux nodes | |
# Original Script by Axel Kohlmeyer <[email protected]> | |
# https://sites.google.com/site/akohlmey/random-hacks/nvidia-gpu-coolness | |
# | |
# Modified for newer drivers and removed old work-arounds |