{"id":20844625,"url":"https://github.com/seiyagame/fan_control_supermicro","last_synced_at":"2025-12-11T22:43:04.616Z","repository":{"id":215324932,"uuid":"738658811","full_name":"SeiyaGame/fan_control_supermicro","owner":"SeiyaGame","description":"Fan Control Script for Supermicro","archived":false,"fork":false,"pushed_at":"2025-06-07T20:52:04.000Z","size":137,"stargazers_count":3,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-21T16:03:09.422Z","etag":null,"topics":["fan","ipmi","ipmitool","supermicro"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SeiyaGame.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-03T18:33:20.000Z","updated_at":"2025-08-17T14:18:32.000Z","dependencies_parsed_at":"2025-05-09T22:25:40.833Z","dependency_job_id":"8433e9f4-5a01-40a7-aec1-a5585c0f2431","html_url":"https://github.com/SeiyaGame/fan_control_supermicro","commit_stats":null,"previous_names":["seiyagame/fan_control_supermicro"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SeiyaGame/fan_control_supermicro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeiyaGame%2Ffan_control_supermicro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeiyaGame%2Ffan_control_supermicro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeiyaGame%2Ffan_control_supermicro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeiyaGame%2Ffan_control_supermicro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SeiyaGame","download_url":"https://codeload.github.com/SeiyaGame/fan_control_supermicro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeiyaGame%2Ffan_control_supermicro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27671885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-11T02:00:11.302Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fan","ipmi","ipmitool","supermicro"],"created_at":"2024-11-18T02:10:15.687Z","updated_at":"2025-12-11T22:43:04.609Z","avatar_url":"https://github.com/SeiyaGame.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fan Control Script for Supermicro\n\n## Resources\n\n- [Supermicro X9/X10/X11 Fan Speed Control](https://forums.servethehome.com/index.php?resources/supermicro-x9-x10-x11-fan-speed-control.20/)\n\n## Description\n\nThis Python script is designed to automatically control the fan speeds of a server based on the temperatures of the hard drives and the CPU. It uses IPMI tools to adjust fan speeds in response to temperature changes, ensuring optimal cooling and performance of the server.\n\n## Features\n\n- Dynamically adjusts fan speeds based on HDD and CPU temperatures.\n- Customizable temperature thresholds for different fan speeds.\n- Supports different zones (CPU and peripheral) for targeted cooling.\n- Dry run mode for testing without applying changes.\n- Metrics (Prometheus Exporter).\n\n## TODO\n\n- [x] Setting up logs\n- [ ] Create a web interface to display temperature data ??\n- [x] Setting up Prometheus exporter\n- [ ] Restrict this script to only works on DEBIAN and TrueNAS SCALE\n\n## Requirements\n\n- Python 3.x\n- Access to IPMI on the server. (`/usr/bin/ipmitool`)\n\n## Installation\n\n\u003e [!WARNING]\n\u003e Tested only on H11SSL-i/c/nc motherboard. I need your feedback/help for the others !\n\nEnsure Python 3.x is installed on your server.  \nInstall ipmitool on your server or ensure it's already installed ( Debian default path : `/usr/bin/ipmitool`)  \n\nThen Clone the project on your folder : `git clone https://github.com/SeiyaGame/fan_control_supermicro.git`\n\nOr download the script and run it :\n\n\u003e [!NOTE]\n\u003e Run the script at your own risk !\n\n\u003e [!WARNING]\n\u003e Make sure you are in the folder where you want to install fan_control !\n\n```bash\ncd folder_where_you_want\nwget https://raw.githubusercontent.com/SeiyaGame/fan_control_supermicro/main/install_script.sh\nchmod +x install_script.sh \u0026\u0026 ./install_script.sh\n```\n\nFinally, you can copy the `config.sample.py` as `config.py` and then edit the variables in the file.  \nAfter that start the service: `service fan-control start` or run the script `python3 fan_control_script.py`\n\nTo see logs you can use the command `fan-control-logs` which is added when you run the script before !  \nOr you can do it manually with `tail -f -n 15 /mnt/tank/scripts/fan_control/logs/fan_control.log`\n\n## Usage\n\n1. Configure the fan speed grids (**DISK_FAN_SPEED_GRID** and **CPU_FAN_SPEED_GRID**) as per your requirements.\n2. Run the script: `python3 fan_control_script.py`\n3. Optionally, enable dry run mode by adding `-d` or `--dry_run` to test without applying changes.\n4. Optionally, you can send logs message to a webhook url by editing variables in the file `config.py` or by adding `--webhook_url 'YOUR_URL'`\n5. Optionally, you can enable metrics (Prometheus Exporter) in the file `config.py` or by adding `--prometheus_enable`. Default port is `9495`\n\n```bash\nusage: fan_control_script.py [-h] [-d] [--no_console_log_stream] [--webhook_url WEBHOOK_URL] [--only_alert] [--prometheus_enable] [--prometheus_port PROMETHEUS_PORT]\n\nControl fan speed via IPMI of Supermicro motherboard\n\noptions:\n  -h, --help            show this help message and exit\n  -d, --dry_run         No changes made, only to visualised\n  --no_console_log_stream\n                        Disable Stream log in console\n  --webhook_url WEBHOOK_URL\n                        Send message to a webhook url\n  --only_alert          Send only alert message to the webhook url (Default: True)\n  --prometheus_enable   Enable Prometheus exporter (Default: False)\n  --prometheus_port PROMETHEUS_PORT (Default: 9495)\n                        Listening port for Prometheus exporter\n```\n\n\n### Output in your console\n\n```bash\nFan mode set to FULL\nSet fan speed for the peripheral zone to 70% (0x46) (Temperature range: 35 → 37)\nSet fan speed for the cpu zone to 45% (0x2d) (Temperature range: 26 → 34)\n-----------\nHDD ↑ 36°C (35 → 37) 70% 💨 | CPU 30°C (26 → 34) 45% 💨\n\nFAN1(700 RPM) | FAN2(700 RPM) | FAN3(700 RPM) | FAN4 | FAN5(700 RPM) | FANA(1000 RPM) | FANB(1000 RPM)\n\n  sda   - 32°C - S/N: ZCT3S9M0     |   sdb   - 27°C - S/N: HLH01J2B     |   sdc   - 32°C - S/N: 2244E6812B23\n  sdd   - 34°C - S/N: 2244E6812A49 |   sde   - 33°C - S/N: ZR13LBZD     |   sdf   - 36°C - S/N: ZCT3S7WH\n  sdg   - 31°C - S/N: 5PH7PMDE     |   sdh   - 34°C - S/N: ZCT3S1HP     |   sdi   - 34°C - S/N: 5PH7P38E\n  sdj   - 34°C - S/N: 5PH7NZEE     |   sdk   - 35°C - S/N: 5PH7J96F     | nvme0n1 - 48°C - S/N: 21337W443408\n```\n\n## Truenas Scale Setup\n\nFollow the step [here](#installation) but install the script in a dataset of your pool for exemple in `/mnt/tank/scripts/fan_control`  \nThen go the Truenas scale web interface in `System Settings` -\u003e `Advanced` -\u003e `Init/Shutdown Scripts` and click `Add`\n\n- Description: `Script to control fan speed`\n- Type: `Command`\n- Script: `cd /mnt/tank/scripts/fan_control \u0026\u0026 chmod +x setup_fan_control_supermicro.sh \u0026\u0026 ./setup_fan_control_supermicro.sh`\n- When: `Post Init`\n- Enable: `Yes`\n\n## Limitations\n\n- Currently, supports only Debian-based systems and TrueNAS Scale. (planned to restrict)\n- Does not include a web interface\n\n## Contributing\n\nContributions to this project are welcome. Please fork the repository and submit pull requests for any enhancements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseiyagame%2Ffan_control_supermicro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseiyagame%2Ffan_control_supermicro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseiyagame%2Ffan_control_supermicro/lists"}