Code Monkey home page Code Monkey logo

hp-ilo-fan-control's Introduction

HP-iLO-Fan-Control

Scripts are available for Linux and ESXi!

Allows a Simple Fan Curve to be set using the custom ROM made by u/phoenixdev on Reddit. (linked below)

This repo contains all the required files! :)

All you need to run is the commands below.

Currently using ILO4 Version 2.60 - Working on updating to 2.77 https://github.com/kendallgoto/ilo4_unlock

BEFORE PROCEEDING

READ SECURITY-SWITCH.MD, IT INCLUDES A LOT OF INFORMATION.

Installation

  1. Switch iLO into maintenance mode, then reboot. (On the DL360 G8, this is located near the backplane connectors to the motherboard.)

  2. Download the install.sh script and run it. This will download all required files and move them, installs the autofan.service, and downloads the correct autofan.sh based on your input ready to be edited. If you are an advanced user, you can install everything separately. (Download using wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Install.sh)

  3. Run the prep.sh in the ilo_250 folder. If this errors, it may be because the iLO isn't it maintenance mode. (You may need to run this script as root. When flashing the fans spin up to 100%, so be prepared)

  4. ./flash_ilo4 --direct

  5. Once the flash has completed, shut down your system and unplug it. Make sure to switch iLO back out of maintenance mode.

  6. Run systemctl daemon-reload and systemctl start autofan to activate the service.

  7. Run systemctl enable autofan to start the service on reboot.

  8. Enjoy silence! :) And if that’s too fast or too slow, edit autofan.sh to your needs.

Tested Servers

1U Servers

DL360p Gen8

2U Servers

DL380p Gen8

DL380p Gen9

DL80 Gen9 - Tested by @rootless4real

SL4540 Gen8 - Tested by @YoSiJo

HPE 2U StoreEasy 1650 - Tested by @nicr4wks

HP 2U ProLiant XL420 Gen9 - Tested by @bogdik

Notes

  • I recommend especially for the DL360 to add a small 40mm fan to the RAID controller to keep it cool.
  • If you have the fan script working on a different server than what's listed in the tested server section, create an issue and I'll add it.

To-do

  • Create a Script to Install and Create fan control scripts
  • Allow easier input of iLO parameters
  • Make ESXI friendly version - Big thanks to @thomaswilbur for making the script and @TannerFilip for making the script easier to use!
  • Add info about the security switch
  • Allow users to input iLO parameters when using install.sh
  • Make the install.sh script have fun colors :D - added thanks to @TannerFilip
  • Add features mentioned in #15

Links and other stuff

Original Reddit post: https://www.reddit.com/r/homelab/comments/hix44v/silence_of_the_fans_pt_2_hp_iLO_4_273_now_with/

hp-ilo-fan-control's People

Contributors

arszilla avatar bogdik avatar ergoproxy1337 avatar rpenziol avatar tannerfilip avatar that-guy-jack avatar theoddball avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar

hp-ilo-fan-control's Issues

I'm getting an error while installing. Install.sh: line read: line 9: illegal option -e Install.sh:

[root@localhost:/autofan] wget https://github.com/That-Guy-Jack/HP-ILO-Fan-Control/blob/main/Install.sh Connecting to github.com (140.82.121.4:443) wget: can't open 'Install.sh': File exists [root@localhost:/autofan] sh Install.sh Install.sh: line 3: id: not found sh: 0: unknown operand You are about to download and install the required items for HP ILO4 fan control. Install.sh: read: line 9: illegal option -e Install.sh: line 66: syntax error: bad substitution [root@localhost:/autofan]

Hello my server;
iLO 4
ProLiant DL380p Gen8

I get an error when I say sh Install.sh. What am I missing?

Alert/Logging

Hello,
This could be a request for a new feature or something that is already available that I overlooked.

As a user, it would be beneficial if the max 255 fan state calls were logged in a verbose manner without having to monitor journalctl. The goal is to better identify environment triggers/patterns which are triggering a higher temp and max fan speed.

autofan.service: Failed with result 'exit-code'.

Hi and first of all thanks for this little script. It runs quite well but I have a problem with the cronjob/service I think. IP and user/pwd are fine, the script seems to connect without problems and read the CPU temps (as can be seen from the below as well). I have these crontab entries in the sudo'ed crontab -e:

@reboot systemctl start autofan
*/10 * * * * systemctl restart autofan

The reason I have the restart every 10 minutes is because it seems the service crashes and this way the fans are adjusted every 10 minutes which for my use case seems sufficient. Of course it would be better if the service just "ran", but I don't know why it crashes all the time.

My system is:

  • ProLiant DL380 Gen9
  • System ROM | P89 v2.80 (10/16/2020)
  • HPE Ethernet 1Gb 4-port 331i Adapter - NIC 20.6.61 Embedded
  • HPE Smart Storage Battery 1 Firmware 2.1 Embedded
  • iLO 2.55 Aug 16 2017
  • Intelligent Platform Abstraction Data 27.01
  • Intelligent Provisioning 2.61.8
  • Power Management Controller Firmware 1.0.9
  • Power Management Controller FW Bootloader 1.0
  • Redundant System ROM P89 v2.22 (07/18/2016)
  • SAS Programmable Logic Device Version 0x02
  • Server Platform Services (SPS) Firmware 3.0.6.267.1
  • Smart Array P440ar Controller 6.06 Embedded
  • System Programmable Logic Device Version 0x30
  • System ROM P89 v2.80 (10/16/2020)

384GB RAM,
2 x Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz
12 x SATA 3.5"
Ubuntu 20.04 Desktop

The syslog shows the following messages:

Jan 8 09:57:51 ProLiant-DL380-Gen9 systemd[1]: autofan.service: Main process exited, code=exited, status=6/NOTCONFIGURED
Jan 8 09:57:51 ProLiant-DL380-Gen9 systemd[1]: autofan.service: Failed with result 'exit-code'.
Jan 8 09:58:01 ProLiant-DL380-Gen9 systemd[1]: autofan.service: Scheduled restart job, restart counter is at 794.
Jan 8 09:58:01 ProLiant-DL380-Gen9 systemd[1]: Stopped Fan Speed Controler using autofan.sh.
Jan 8 09:58:01 ProLiant-DL380-Gen9 systemd[1]: Started Fan Speed Controler using autofan.sh.
Jan 8 09:58:01 ProLiant-DL380-Gen9 bash[1842895]: ===============
Jan 8 09:58:01 ProLiant-DL380-Gen9 bash[1842895]: CPU 1 Temp 67 C
Jan 8 09:58:01 ProLiant-DL380-Gen9 bash[1842895]: ===============
Jan 8 09:58:05 ProLiant-DL380-Gen9 bash[1842895]: ===============
Jan 8 09:58:05 ProLiant-DL380-Gen9 bash[1842895]: CPU 2 Temp 80 C
Jan 8 09:58:05 ProLiant-DL380-Gen9 bash[1842895]: ===============
Jan 8 09:58:06 ProLiant-DL380-Gen9 systemd[1]: Stopping Fan Speed Controler using autofan.sh...
Jan 8 09:58:06 ProLiant-DL380-Gen9 systemd[1]: autofan.service: Succeeded.
Jan 8 09:58:06 ProLiant-DL380-Gen9 systemd[1]: Stopped Fan Speed Controler using autofan.sh.
Jan 8 09:58:06 ProLiant-DL380-Gen9 systemd[1]: Started Fan Speed Controler using autofan.sh.
Jan 8 09:58:06 ProLiant-DL380-Gen9 bash[1842928]: ===============
Jan 8 09:58:06 ProLiant-DL380-Gen9 bash[1842928]: CPU 1 Temp 67 C
Jan 8 09:58:06 ProLiant-DL380-Gen9 bash[1842928]: ===============
Jan 8 09:58:12 ProLiant-DL380-Gen9 bash[1842928]: ===============
Jan 8 09:58:12 ProLiant-DL380-Gen9 bash[1842928]: CPU 2 Temp 80 C
Jan 8 09:58:12 ProLiant-DL380-Gen9 bash[1842928]: ===============
Jan 8 09:58:16 ProLiant-DL380-Gen9 systemd[1]: autofan.service: Main process exited, code=exited, status=6/NOTCONFIGURED
Jan 8 09:58:16 ProLiant-DL380-Gen9 systemd[1]: autofan.service: Failed with result 'exit-code'.

Also to add, when I SSH into ILO and manually pass the command, I get:

</>hpiLO-> fan p3 max 115 

status=2
status_tag=COMMAND PROCESSING FAILED
error_tag=COMMAND NOT RECOGNIZED
Sat Jan  8 07:21:40 2022

Thanks for your help, happy to do some troubleshooting if you need additional log info.
Cheers!

Working Server - ProLiant DL160 Gen9

I got this working nicely on a ProLiant DL160 Gen9 running Promxox.

System ROM | U20 v3.30 (09/21/2023)
iLO Firmware Version | 2.73 Feb 11 2020

I did have to run this separately to get the right software installed, being a Gen 9:

apt-get install pciutils wmtemp lm-sensors
wget http://downloads.linux.hpe.com/SDR/repo/mcp/debian/pool/non-free/hp-ams_2.8.3-3056.1ubuntu16_amd64.deb
wget http://downloads.linux.hpe.com/SDR/repo/mcp/debian/pool/non-free/hp-health_10.80-1874.10_amd64.deb
wget http://downloads.linux.hpe.com/SDR/repo/mcp/debian/pool/non-free/hp-snmp-agents_10.60-2953.16_amd64.deb
dpkg --install hp-ams_2.8.3-3056.1ubuntu16_amd64.deb
dpkg --force-all --install hp-health_10.80-1874.10_amd64.deb
dpkg --install hp-snmp-agents_10.60-2953.16_amd64.deb

Uppercase I in README.md cause 404

If you follow the guide and copy & paste the wget install.sh line in README.md line 22 it fails with a 404:

(Download using wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/Install.sh)

should be:

(Download using wget https://raw.githubusercontent.com/That-Guy-Jack/HP-ILO-Fan-Control/main/install.sh)

Note the uppercase "i" in install.sh.

sshpass not working

Hi there. Sadly the sshpass is not working for me on proxmox. Any idea?

I even executed it manually like
sshpass -p myIloPw ssh myIloUsr@MyIloIp 'fan p 3 max 255'
but seams not to work. Only when I connect over ssh directly and use the fan p 3 max 255 it works.

sshpass cannot run in esxi 8.0

sshpass cannot run in esxi 8.0
In addition, the "#!/bin/bash" at the beginning of the esxi8.0 script will report an error, which needs to be modified to “#!/ bin/sh”

07BF0 sensor ID

You can add DL80 Gen9 to the list. It works very well. Thank you, thank you, thank you!

There is one issue I've been unable to resolve. There is a sensor id 07FB00 that is tied to the on-board drive controller - B140i. I cannot address that sensor. All the rest are 1-2 digits.

Is there a way to allow it to address that sensor? Or any other known work-around?

Thank you, thank you.

ESXI 8, unable to use script

Hi does somebody has succeded to install the script on a DL380p Gen8 esxi 8?

When trying to install with install.sh, I've the following errors:
You are about to download and install the required items for HP ILO4 fan control.
./install.sh: read: line 10: illegal option -e
./install.sh: line 80: syntax error: bad substitution

further sshpass doesn't seems to work on esxi 8, whatever I tried I've still the access denied.
exemple :
sshpass -p XXX ssh [email protected]
-sh: sshpass: Operation denied
I've tried on a distant ubuntu and the command works...

Thanks a lot

Ideas/Request - How to apply this to ESXi itself?

Hi! My g8 it's a ESXi environment and I have 2 ways to implement this.

  • Make a ubuntu VM and install script on it.
  • In any way, install this on ESXi.

There are any way already explored to make it work on ESXi?

Thanks a lot!

How to validate fans

Hi there, thanks for this amazing piece of software! I use a G9 and it seems to work fine. However I do have a question which may seem dumb, however I just want to check I get this right:

  • below if Tx > xx refers to temperature in Celsius, right? per the sensor reading the core temp, right?
  • is the scale used the same as the 0-255 from the fan info?
  • how does this affect the 6 fans in the server, does it ramp them all up equally (left side, right side?)

Sorry, just getting started with this whole fan control piece. I assume the fan groupings being 0-5 are represented below with the 0-1-2 and 3-4-5.

Appreciate just a little bit more clarity! Cheers!

PS: I edited the below MAX to 160 to avoid the fans going off on full blast..

`echo "==============="
echo "CPU 2 Temp $T2 C"
echo "==============="

if [[ $T2 > 67 ]]
then
sshpass -p $PASSWORD ssh $USERNAME@$ILOIP 'fan p 0 max 160'
sshpass -p $PASSWORD ssh $USERNAME@$ILOIP 'fan p 1 max 160'
sshpass -p $PASSWORD ssh $USERNAME@$ILOIP 'fan p 2 max 160'

elif [[ $T2 > 58 ]]
then
sshpass -p $PASSWORD ssh $USERNAME@$ILOIP 'fan p 0 max 39'
sshpass -p $PASSWORD ssh $USERNAME@$ILOIP 'fan p 1 max 39'
sshpass -p $PASSWORD ssh $USERNAME@$ILOIP 'fan p 2 max 39'
elif [[ $T2 > 54 ]]
then
`

Alternative fan control script.

Thought I would bring this to attention here: https://github.com/Aterfax/ilo4_unlock/blob/main/scripts/kg-silence-dl380pG8-screen-method.sh

tl;dr - This is an alternative script which uses SSH keys and screen to preserve the first TTY for further input and to see further output.

This avoids the bug where only the first SSH session / TTY gets fan info stdout.

You may want to adopt parts of this method into your existing scripts so I figured I'd leave an issue rather than a PR.

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.