This script provides an automated fan speed control based on operating temperature of HDD and CPU of the only one fan in HP Microserver Gen8.
You must run a modified ILO 4 with accessible fan
command in order to use this (see Acknowledgements section)
Login to iLO > Administration (tab) > User Administration.
Create a new user.
Remove the following (all) 5 permissions. They are not needed:
- Administer User Accounts
- Remote Console Access
- Virtual Power and Reset
- Virtual Media
- Configure iLO Settings
You must need an RSA key. Be aware that this command will overwrite your current key, if exists
ssh-keygen -t rsa -b 2048
In iLO web interface go to Administration->Security choose a user, click Authorize new Key and paste your public key
You can usually obtain it like this
cat .ssh/id_rsa.pub
If you are going to use password-based auth, then you must have sshpass installed.
For deb based distributions run
apt install sshpass
Download repository
git clone https://github.com/fed1337/ilo4_fan_management.git
Make sure that the script is executable and config is readable. Make changes if necessary
ls -lh ilo4_fan_management
chmod 777 ilo4_fan_management/fanmgmt.sh
chmod 444 ilo4_fan_management/fanmgmt.conf
Consult comments in the config file for a setup
nano ilo4_fan_management/fanmgmt.conf
crontab -e
Add a line (change the script path) and save (ctrl+w for nano)
* * * * * * /home/fed/ilo4_fan_management/fanmgmt.sh
This task is scheduled to run every minute
Adjust path in fanmgmt.service then copy it to systemd.
hp-ams
and hp-health
are not really needed. However, they are nice to have. If you choose not to install those packages, you need to modify Unit
section as well.
sudo cp ilo4_fan_management/fanmgmt.service /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl start fanmgmt
sudo systemctl status fanmgmt
Please inspect the script code, specifically how temperatures are grep'ed. Your sensors may be called differently.
Those are HDD*
and CPU*
variables
Another idea is that you may want a more/less aggressive fan curve. Study how HDD_PERC
and CPU_PERC
variables are set.
i.e. fan info
does not provide any output
"Solution"
Only first login can see any responses.
Reset iLO (iLO > Info > Diagnostics) each time in order to see the responses.
This is a firmware bug
It couldn't be possible to sleep at nights with this server in the same room without these talented people