silencing hpe g8 servers

· ahwx's blog

# Silencing HPE servers

Hey there!

Some of you might be running a DL380p G8 (or any other G8 server from HP with iLO 4, which is supported by this tweak), and want it to be nearly silent. I've found a way to do it, which doesn't involve (almost) any physical work! Let's get into it! (I've gotten the fans at a constant 10% (I configured 10% since I get less whine and next-to-nothing ramp ups that way) and am perfectly able to sleep ~3m away from it).

So before we begin, just a quick note:

# Note from their GitHub:

Please note: At this time, v4.77 is the most recent iLO that has a working patch. After this version, HP has removed many of the control utilities that make patching v2.78 and v2.79 useful. While this may change in the future, bringing useful tools to v2.79 (the current latest) will take an extremely large amount of work. The patching works fine here, it just does not provide access to useful functions

# Installing/prepairing

1sudo apt-add-repository universe
2sudo apt update
3sudo apt install python2-minimal git curl

# Install Pip

1curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py && sudo python2 get-pip.py
1python2 -m pip install virtualenv
2git clone --recurse-submodules https://github.com/kendallgoto/ilo4_unlock
3cd ilo4_unlock
4python2 -m virtualenv venv source venv/bin/activate
5pip install -r requirements.txt

# Building

1./build.sh init
2This will build iLO version 2.77
3
4./build.sh 277

# Patching

Note: this will make the server scream for ~5 minutes. To patch, you need to have iLO Security Override set to enabled. On a DL380p G8 I had to flip the first DIP switch on the motherboard, just under the PSU's. Obviously do this whilst the server is powered down.

Make sure any HP libraries are unloaded and let's go

1sudo modprobe -r hpilo
2mkdir -p flash
3cp binaries/flash_ilo4 binaries/CP027911.xml flash/
4cp build/ilo4_277.bin.patched flash/ilo4_250.bin
5cd flash

# Flash iLO 4. This will make the server SCREAM!!!

1sudo ./flash_ilo4 --direct

Once the command has finished and the fans are back to normal, remove power and disable iLO Security Override.

# Silencing the fans

You can ssh into your iLO and type fan info g. Lower the fans with these commands:

1fan pid x lo 1000

Here, x is the pid with an astherisk( * ) next to it.

# Scripting

Since iLO fan settings will reset on reboot, we can easily script this.

Make sure you've accepted the SSH fingerprint already.

This is one of my scripts, feel free to use.

 1#!/bin/sh
 2
 3PASSWORD="iLO_PASSWORD" # Change to yours
 4USERNAME="Administrator"
 5ILOIP="10.0.0.115" # Change to yours
 6
 7sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan p 00 min 30'
 8sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan p 01 min 30'
 9sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan p 02 min 30'
10sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan p 03 min 30'
11sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan p 04 min 30'
12sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan p 05 min 30'
13sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan p 06 min 30'
14sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 01 lo 1000'
15sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 02 lo 1000'
16sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 03 lo 1000'
17sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 04 lo 1000'
18sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 05 lo 1000'
19sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 06 lo 1000'
20sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 07 lo 1000'
21sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 08 lo 1000'
22sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 09 lo 1000'
23sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 10 lo 1000'
24sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 11 lo 1000'
25sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 12 lo 1000'
26sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 13 lo 1000'
27sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 14 lo 1000'
28sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 15 lo 1000'
29sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 16 lo 1000'
30sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 17 lo 1000'
31sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 18 lo 1000'
32sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 19 lo 1000'
33sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 20 lo 1000'
34sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 21 lo 1000'
35sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 22 lo 1000'
36sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 23 lo 1000'
37sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 24 lo 1000'
38sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 25 lo 1000'
39sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 26 lo 1000'
40sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 27 lo 1000'
41sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 28 lo 1000'
42sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 29 lo 1000'
43sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 30 lo 1000'
44sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 31 lo 1000'
45sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 32 lo 1000'
46sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 33 lo 1000'
47sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 34 lo 1000'
48sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 35 lo 1000'
49sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 36 lo 1000'
50sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 37 lo 1000'
51sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 38 lo 1000'
52sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 39 lo 1000'
53sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 40 lo 1000'
54sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 41 lo 1000'
55sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 42 lo 1000'
56sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 43 lo 1000'
57sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 44 lo 1000'
58sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 45 lo 1000'
59sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 46 lo 1000'
60sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 47 lo 1000'
61sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 48 lo 1000'
62sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 49 lo 1000'
63sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 50 lo 1000'
64sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 51 lo 1000'
65sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 52 lo 1000'
66sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 53 lo 1000'
67sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 54 lo 1000'
68sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 55 lo 1000'
69sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 56 lo 1000'
70sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 57 lo 1000'
71sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 58 lo 1000'
72sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 59 lo 1000'
73sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 60 lo 1000'
74sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 61 lo 1000'
75sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 62 lo 1000'
76sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 63 lo 1000'
77sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 64 lo 1000'
78sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 65 lo 1000'
79sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 66 lo 1000'
80sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 67 lo 1000'
81sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 68 lo 1000'
82sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 69 lo 1000'
83sshpass -p $PASSWORD ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa $USERNAME@$ILOIP 'fan pid 70 lo 1000'