Giter Club home page Giter Club logo

r710-fan-control's Introduction

r710-fan-control

If you run your R710 in a dedicated server room noise won't be an issue for you. If you have a R710 in your flat the situation is a bit different as per default the fans ramp up pretty fast and the noise level goes up with them. Mine actually never goes below 3.6k RPM which is still acceptable but the slightest increase in load will get at least some fans up to 6k RPM and that is very noticeable.

How does it work?

While searching for a solution to this problem i stumbled across some scripts by @NoLooseEnds that set the speed to a defined value: R710-IPMI-TEMP

Based on that i started playing around with the ipmitool and wrote this tool in Ruby that can be used to set a specific value but as well to actually monitor the cpu core temperature and ramp up the fans accordingly. To do that you can configure which fan speed should be applied at which temperature and just let it run. If the cpu temperature goes above the defined max temperature it will switch back to Dell's automatic mode. This will bring the temperature back down to a reasonable value and after a configurable cool down period we start again with our fan speeds.

Prerequisites

In IDRAC In order to read and set fan speeds idrac needs to be enabled and ipmi needs to be reachable.

In the OS This tool is written in Ruby so Ruby and some gems are needed:

  • thor for the cli
  • colorize as I like color output

ipmitool needs to be installed and on the PATH

lm_sensors needs to be installed and configured

Configuration

Check out the sample config file

---
# configuration file for sulaweyo/r710-fan-control
:user: 'your user'      # idrac user
:pass: 'your password'  # idrac password
:host: 'your idrac ip'  # idrac ip
:interval: 5            # time between checks in control loop
:max_manual_temp: 66    # switch back to automatic fan control at this temp
:cool_down_time: 120    # after switch to automatic wait that long before checking again
# the following hash defines fan speed values and the temp rang that is ok for that speed
:speed_steps:
  !ruby/range 0..40: 15   # run at 15% speed up to 30°C
  !ruby/range 41..50: 20  # run at 20% speed up to 40°C
  !ruby/range 51..55: 30  # run at 30% speed up to 50°C
  !ruby/range 56..60: 35  # run at 35% speed up to 60°C
  !ruby/range 61..65: 40  # run at 40% speed up to 65°C

Obviously you can adjust all these values to your liking or add/remove speed steps. Just make sure to really test how the temperatures develop along with these values!

Installation

Check out the script to wherever you like and run 'bundler install' in that directory to get the required gems. After that run './Fan-Control-CLI.rb' to see available commands.

./Fan-Control-CLI.rb 
Commands:
  Fan-Control-CLI.rb fanspeed          # Get the current fan speed
  Fan-Control-CLI.rb help [COMMAND]    # Describe available commands or one specific command
  Fan-Control-CLI.rb reset             # Switch back to automatic fan control
  Fan-Control-CLI.rb setspeed [value]  # Set fan speed to given percent of max speed
  Fan-Control-CLI.rb start             # Start fan control loop
  Fan-Control-CLI.rb temp              # Get current cpu core temperature

To run it as a service a systemd unit is included but you need to update location and user before starting it. Copy or link it to '/etc/systemd/system/', run 'systemctl daemon-reload' to make systemd aware of the new service and then start/enable it.

Disclaimer

The sample values seem to work fine for me but I cannot emphasise enough that you need to test what works for you. The script disables the built in fan control and that can lead to damage!

I take NO responsibility if you mess up anything.

r710-fan-control's People

Contributors

sulaweyo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

r710-fan-control's Issues

issue running on debian

Hi,
I was wanting to give a try on your script,
But after installing
apt-get install gem
then i tried installing the bundler but i get this error
Not much familiar on installing ruby

 gem install bundler
-bash: gem: command not found

Thank you

issue on daemon?

Hi,
Currently was working with no issue the daemon but recently checking i found this

service  fan-control status
● fan-control.service - R710 fan control
   Loaded: loaded (/etc/systemd/system/fan-control.service; disabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Sun 2020-08-16 16:11:00 -05; 4s ago
  Process: 17525 ExecStopPost=/opt/r710-fan-control/Fan-Control-CLI.rb reset (code=exited, status=0/SUCCESS)
  Process: 17475 ExecStart=/opt/r710-fan-control/Fan-Control-CLI.rb start (code=exited, status=1/FAILURE)
 Main PID: 17475 (code=exited, status=1/FAILURE)
      CPU: 558ms

This is the config

[Unit]
Description=R710 fan control

[Service]
Type=simple
User=root
Group=root
ExecStart=/opt/r710-fan-control/Fan-Control-CLI.rb start
ExecStopPost=/opt/r710-fan-control/Fan-Control-CLI.rb reset
WorkingDirectory=/opt/r710-fan-control
Restart=always
RestartSec=15

[Install]
WantedBy=multi-user.target

/opt/r710-fan-control# ls
Fan-Control-CLI.rb  Fan_Control.rb  fan-control.service  fan-control.yaml  Gemfile  LICENSE  README.md


# configuration file for sulaweyo/r710-fan-control
:user: 'root'           # idrac user
:pass: 'mypass'  # idrac password
:host: '192.168.3.66'  # idrac ip
:interval: 5            # time between checks in control loop
:max_manual_temp: 66    # switch back to automatic fan control at this temp
:cool_down_time: 120    # after switch to automatic wait that long before checking again
# the following hash defines fan speed values and the temp rang that is ok for that speed
:speed_steps:
  !ruby/range 0..40: 15   # run at 10% speed up to 30°C
  !ruby/range 41..50: 20  # run at 15% speed up to 40°C
  !ruby/range 51..55: 30 # run at 20% speed up to 50°C
  !ruby/range 56..60: 35  # run at 30% speed up to 60°C
  #!ruby/range 61..66: 40  # run at 40% speed up to 65°C
  !ruby/range 67..70: 50  # run at 50% speed up to 70°C

i stop the service then i see this


/opt/r710-fan-control# service fan-control status
● fan-control.service - R710 fan control
   Loaded: loaded (/etc/systemd/system/fan-control.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

Aug 16 16:14:52 prometheus4 Fan-Control-CLI.rb[44660]: Automatic fan control restored
Aug 16 16:14:52 prometheus4 systemd[1]: fan-control.service: Unit entered failed state.
Aug 16 16:14:52 prometheus4 systemd[1]: fan-control.service: Failed with result 'exit-code'.
Aug 16 16:15:07 prometheus4 systemd[1]: fan-control.service: Service hold-off time over, scheduling restart.
Aug 16 16:15:07 prometheus4 systemd[1]: Stopped R710 fan control.
Aug 16 16:15:07 prometheus4 systemd[1]: Started R710 fan control.
Aug 16 16:15:08 prometheus4 systemd[1]: Stopping R710 fan control...
Aug 16 16:15:08 prometheus4 Fan-Control-CLI.rb[46248]: Loading configuration from fan-control.yaml
Aug 16 16:15:08 prometheus4 Fan-Control-CLI.rb[46248]: Automatic fan control restored
Aug 16 16:15:08 prometheus4 systemd[1]: Stopped R710 fan control.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.