diff --git a/Makefile b/Makefile index bf9a73d..da646ba 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ install: $(service_dir) $(conf_dir) superfans-gpu-controller.service cp etc/systemd/system/superfans-gpu-controller.service $(service_dir) -systemctl enable superfans-gpu-controller.service -systemctl enable superfans-gpu-controller + -systemctl start superfans-gpu-controller uninstall: -systemctl stop superfans-gpu-controller diff --git a/README.md b/README.md index 975a4c9..651410c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This controller enables automatic adjustments of FANs in SUPERMICRO servers base # Requirements * Linux (tested on Ubuntu 16.04.5) -* Python 2.7 +* Python 3 / pip3 * nvidia drivers/tools (`nvidia-smi`) * IPMI tool (`ipmitool`) with loaded module (`modprobe ipmi_devintf`) @@ -13,20 +13,17 @@ Tested on SUPERMICRO 4029GP TRT2 with RTX 2080 Ti (nvidia 415.27 drivers). NOTE: Using this script on other systems requires manual calibration of a function that converts the FANs RPM values into %-based values (function `SUPERMICRO_4029GP_TRT2_RPM_to_percent()` in `supermicro.py`). Current values are hardcoded for SUPERMICRO 4029GP TRT2. +# Install + +```bash +make +sudo make install +``` + +By default python packages are installed using pip3 and superfans-gpu-controller.service is created (started and enabled at boot). + # Usage -Directly call python script (requires sudo access for `impitool`): -```bash -sudo python superfans_gpu_controller.py -``` - -Or install systemd service (`superfans-gpu-controller.service`): - -```bash -sudo chmod +x ./install_daemon.sh -sudo ./install_daemon.sh -``` - Service is registered to start at system startup. Start and stop it using: ```bash # start @@ -42,6 +39,13 @@ sudo systemctl status superfans-gpu-controller sudo journalctl -f -u superfans-gpu-controller ``` +## Manuall usage + +Directly call python script (requires sudo access for `impitool`): +```bash +sudo python superfans_gpu_controller.py config.json +``` + ## Print RPMs of all FANs grouped by zones: ```bash @@ -50,7 +54,20 @@ sudo python superfans.py # Settings -Currently the settings are hardcoded into `superfans_gpu_controller.py` using the following table: +Settings are in /etc/superfans-gpu-controller.json for systemd and by default the config contains: + +```python +{ + "fan_settings" : {"0": 20, + "60": 25, + "70": 30, + "80": 35, + "87": 40, + "90": 43} +} + +``` +This corresponds to following mapping of GPU temperature in °C to the percent of activated FAN (relative to max RPM as manually set for SUPERMICRO 4029GP TRT2): * 0°C => 20% * 60°C => 25% * 70°C => 30% @@ -61,7 +78,7 @@ Currently the settings are hardcoded into `superfans_gpu_controller.py` using th At full workload using 4x RTX 2080 Ti this results in around 75°C - 80°C at GPU. ## TODO: - * [ ] split settings into seperate config file + * [x] split settings into seperate config file * [ ] enable linear increases between each setting point * [ ] enable online calibration of FANs (currenlty hardcoded for SUPERMICRO 4029GP TRT2!!) * [ ] enable robust detection of faulty FANs as outliers (using RANSAC-like algorithm)