Compare commits
No commits in common. "master" and "19-throw-away-ipmitool-commands-output-to-avoid-new-line-in-docker-logs" have entirely different histories.
master
...
19-throw-a
@ -1,12 +0,0 @@
|
||||
{
|
||||
"image": "mcr.microsoft.com/devcontainers/universal:2",
|
||||
"features": {},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-azuretools.vscode-docker",
|
||||
"mhutchie.git-graph"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,2 @@
|
||||
.github
|
||||
.devcontainer
|
||||
publish.sh
|
||||
README.md
|
||||
@ -1,57 +0,0 @@
|
||||
name: Docker image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- '**/README.md'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and publish Docker image to Docker Hub and GitHub Containers Repository
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Remove "_Docker" suffix from GitHub repository name to use it as image name
|
||||
uses: mad9000/actions-find-and-replace-string@3
|
||||
id: docker_image_name
|
||||
with:
|
||||
source: ${{ github.repository }}
|
||||
find: '_Docker'
|
||||
replace: ''
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
${{ steps.docker_image_name.outputs.value }}
|
||||
ghcr.io/${{ steps.docker_image_name.outputs.value }}
|
||||
tags: type=raw,value=latest
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Build and publish Docker image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
33
.github/workflows/docker-image.yml
vendored
Normal file
33
.github/workflows/docker-image.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: Docker Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: tigerblue77/dell_idrac_fan_controller
|
||||
tags: type=raw,value=latest
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
@ -1,103 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Enable strict bash mode to stop the script if an uninitialized variable is used, if a command fails, or if a command with a pipe fails
|
||||
# Not working in some setups : https://github.com/tigerblue77/Dell_iDRAC_fan_controller/issues/48
|
||||
# set -euo pipefail
|
||||
|
||||
# Define global functions
|
||||
# This function applies Dell's default dynamic fan control profile
|
||||
function apply_Dell_fan_control_profile () {
|
||||
# Use ipmitool to send the raw command to set fan control to Dell default
|
||||
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0x30 0x01 0x01 > /dev/null
|
||||
apply_Dell_profile () {
|
||||
ipmitool -I $LOGIN_STRING raw 0x30 0x30 0x01 0x01 > /dev/null
|
||||
CURRENT_FAN_CONTROL_PROFILE="Dell default dynamic fan control profile"
|
||||
}
|
||||
|
||||
# This function applies a user-specified static fan control profile
|
||||
function apply_user_fan_control_profile () {
|
||||
# Use ipmitool to send the raw command to set fan control to user-specified value
|
||||
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0x30 0x01 0x00 > /dev/null
|
||||
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0x30 0x02 0xff $HEXADECIMAL_FAN_SPEED > /dev/null
|
||||
apply_user_profile () {
|
||||
ipmitool -I $LOGIN_STRING raw 0x30 0x30 0x01 0x00 > /dev/null
|
||||
ipmitool -I $LOGIN_STRING raw 0x30 0x30 0x02 0xff $HEXADECIMAL_FAN_SPEED > /dev/null
|
||||
CURRENT_FAN_CONTROL_PROFILE="User static fan control profile ($DECIMAL_FAN_SPEED%)"
|
||||
}
|
||||
|
||||
# Retrieve temperature sensors data using ipmitool
|
||||
# Usage : retrieve_temperatures $IS_EXHAUST_TEMPERATURE_SENSOR_PRESENT $IS_CPU2_TEMPERATURE_SENSOR_PRESENT
|
||||
function retrieve_temperatures () {
|
||||
if (( $# != 2 ))
|
||||
then
|
||||
printf "Illegal number of parameters.\nUsage: retrieve_temperatures \$IS_EXHAUST_TEMPERATURE_SENSOR_PRESENT \$IS_CPU2_TEMPERATURE_SENSOR_PRESENT" >&2
|
||||
return 1
|
||||
fi
|
||||
local IS_EXHAUST_TEMPERATURE_SENSOR_PRESENT=$1
|
||||
local IS_CPU2_TEMPERATURE_SENSOR_PRESENT=$2
|
||||
|
||||
local DATA=$(ipmitool -I $IDRAC_LOGIN_STRING sdr type temperature | grep degrees)
|
||||
|
||||
# Parse CPU data
|
||||
local CPU_DATA=$(echo "$DATA" | grep "3\." | grep -Po '\d{2}')
|
||||
CPU1_TEMPERATURE=$(echo $CPU_DATA | awk '{print $1;}')
|
||||
if $IS_CPU2_TEMPERATURE_SENSOR_PRESENT
|
||||
then
|
||||
CPU2_TEMPERATURE=$(echo $CPU_DATA | awk '{print $2;}')
|
||||
else
|
||||
CPU2_TEMPERATURE="-"
|
||||
fi
|
||||
|
||||
# Parse inlet temperature data
|
||||
INLET_TEMPERATURE=$(echo "$DATA" | grep Inlet | grep -Po '\d{2}' | tail -1)
|
||||
|
||||
# If exhaust temperature sensor is present, parse its temperature data
|
||||
if $IS_EXHAUST_TEMPERATURE_SENSOR_PRESENT
|
||||
then
|
||||
EXHAUST_TEMPERATURE=$(echo "$DATA" | grep Exhaust | grep -Po '\d{2}' | tail -1)
|
||||
else
|
||||
EXHAUST_TEMPERATURE="-"
|
||||
fi
|
||||
}
|
||||
|
||||
function enable_third_party_PCIe_card_Dell_default_cooling_response () {
|
||||
# We could check the current cooling response before applying but it's not very useful so let's skip the test and apply directly
|
||||
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00 > /dev/null
|
||||
}
|
||||
|
||||
function disable_third_party_PCIe_card_Dell_default_cooling_response () {
|
||||
# We could check the current cooling response before applying but it's not very useful so let's skip the test and apply directly
|
||||
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00 > /dev/null
|
||||
}
|
||||
|
||||
# Returns :
|
||||
# - 0 if third-party PCIe card Dell default cooling response is currently DISABLED
|
||||
# - 1 if third-party PCIe card Dell default cooling response is currently ENABLED
|
||||
# - 2 if the current status returned by ipmitool command output is unexpected
|
||||
# function is_third_party_PCIe_card_Dell_default_cooling_response_disabled() {
|
||||
# THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE=$(ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x01 0x16 0x05 0x00 0x00 0x00)
|
||||
|
||||
# if [ "$THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE" == "16 05 00 00 00 05 00 01 00 00" ]; then
|
||||
# return 0
|
||||
# elif [ "$THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE" == "16 05 00 00 00 05 00 00 00 00" ]; then
|
||||
# return 1
|
||||
# else
|
||||
# echo "Unexpected output: $THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE" >&2
|
||||
# return 2
|
||||
# fi
|
||||
# }
|
||||
|
||||
# Prepare traps in case of container exit
|
||||
function gracefull_exit () {
|
||||
apply_Dell_fan_control_profile
|
||||
enable_third_party_PCIe_card_Dell_default_cooling_response
|
||||
gracefull_exit () {
|
||||
apply_Dell_profile
|
||||
echo "/!\ WARNING /!\ Container stopped, Dell default dynamic fan control profile applied for safety."
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Trap the signals for container exit and run gracefull_exit function
|
||||
trap 'gracefull_exit' SIGQUIT SIGKILL SIGTERM
|
||||
|
||||
# Prepare, format and define initial variables
|
||||
|
||||
# readonly DELL_FRESH_AIR_COMPLIANCE=45
|
||||
#readonly DELL_FRESH_AIR_COMPLIANCE=45
|
||||
|
||||
# Check if FAN_SPEED variable is in hexadecimal format. If not, convert it to hexadecimal
|
||||
if [[ $FAN_SPEED == 0x* ]]
|
||||
then
|
||||
DECIMAL_FAN_SPEED=$(printf '%d' $FAN_SPEED)
|
||||
@ -108,130 +35,80 @@ else
|
||||
fi
|
||||
|
||||
# Log main informations given to the container
|
||||
echo "iDRAC/IPMI host: $IDRAC_HOST"
|
||||
|
||||
# Check if the iDRAC host is set to 'local' or not then set the IDRAC_LOGIN_STRING accordingly
|
||||
echo "Idrac/IPMI host: $IDRAC_HOST"
|
||||
if [[ $IDRAC_HOST == "local" ]]
|
||||
then
|
||||
# Check that the Docker host IPMI device (the iDRAC) has been exposed to the Docker container
|
||||
if [ ! -e "/dev/ipmi0" ] && [ ! -e "/dev/ipmi/0" ] && [ ! -e "/dev/ipmidev/0" ]; then
|
||||
echo "/!\ Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0, check that you added the device to your Docker container or stop using local mode. Exiting." >&2
|
||||
exit 1
|
||||
fi
|
||||
IDRAC_LOGIN_STRING='open'
|
||||
LOGIN_STRING='open'
|
||||
else
|
||||
echo "iDRAC/IPMI username: $IDRAC_USERNAME"
|
||||
echo "iDRAC/IPMI password: $IDRAC_PASSWORD"
|
||||
IDRAC_LOGIN_STRING="lanplus -H $IDRAC_HOST -U $IDRAC_USERNAME -P $IDRAC_PASSWORD"
|
||||
echo "Idrac/IPMI username: $IDRAC_USERNAME"
|
||||
echo "Idrac/IPMI password: $IDRAC_PASSWORD"
|
||||
LOGIN_STRING="lanplus -H $IDRAC_HOST -U $IDRAC_USERNAME -P $IDRAC_PASSWORD"
|
||||
fi
|
||||
|
||||
# Log the fan speed objective, CPU temperature threshold and check interval
|
||||
echo "Fan speed objective: $DECIMAL_FAN_SPEED%"
|
||||
echo "CPU temperature threshold: $CPU_TEMPERATURE_THRESHOLD°C"
|
||||
echo "CPU temperature treshold: $CPU_TEMPERATURE_TRESHOLD°C"
|
||||
echo "Check interval: ${CHECK_INTERVAL}s"
|
||||
echo ""
|
||||
|
||||
# Define the interval for printing
|
||||
readonly TABLE_HEADER_PRINT_INTERVAL=10
|
||||
i=$TABLE_HEADER_PRINT_INTERVAL
|
||||
# Set the flag used to check if the active fan control profile has changed
|
||||
IS_DELL_FAN_CONTROL_PROFILE_APPLIED=true
|
||||
|
||||
# Check present sensors
|
||||
IS_EXHAUST_TEMPERATURE_SENSOR_PRESENT=true
|
||||
IS_CPU2_TEMPERATURE_SENSOR_PRESENT=true
|
||||
retrieve_temperatures $IS_EXHAUST_TEMPERATURE_SENSOR_PRESENT $IS_CPU2_TEMPERATURE_SENSOR_PRESENT
|
||||
if [ -z "$EXHAUST_TEMPERATURE" ]
|
||||
then
|
||||
echo "No exhaust temperature sensor detected."
|
||||
IS_EXHAUST_TEMPERATURE_SENSOR_PRESENT=false
|
||||
fi
|
||||
if [ -z "$CPU2_TEMPERATURE" ]
|
||||
then
|
||||
echo "No CPU2 temperature sensor detected."
|
||||
IS_CPU2_TEMPERATURE_SENSOR_PRESENT=false
|
||||
fi
|
||||
# Output new line to beautify output if one of the previous conditions have echoed
|
||||
if ! $IS_EXHAUST_TEMPERATURE_SENSOR_PRESENT || ! $IS_CPU2_TEMPERATURE_SENSOR_PRESENT
|
||||
then
|
||||
echo ""
|
||||
fi
|
||||
IS_DELL_PROFILE_APPLIED=true
|
||||
|
||||
# Start monitoring
|
||||
while true; do
|
||||
# Sleep for the specified interval before taking another reading
|
||||
sleep $CHECK_INTERVAL &
|
||||
SLEEP_PROCESS_PID=$!
|
||||
DATA=$(ipmitool -I $LOGIN_STRING sdr type temperature | grep degrees)
|
||||
INLET_TEMPERATURE=$(echo "$DATA" | grep Inlet | grep -Po '\d{2}' | tail -1)
|
||||
EXHAUST_TEMPERATURE=$(echo "$DATA" | grep Exhaust | grep -Po '\d{2}' | tail -1)
|
||||
CPU_DATA=$(echo "$DATA" | grep "3\." | grep -Po '\d{2}')
|
||||
CPU1_TEMPERATURE=$(echo $CPU_DATA | awk '{print $1;}')
|
||||
CPU2_TEMPERATURE=$(echo $CPU_DATA | awk '{print $2;}')
|
||||
|
||||
retrieve_temperatures $IS_EXHAUST_TEMPERATURE_SENSOR_PRESENT $IS_CPU2_TEMPERATURE_SENSOR_PRESENT
|
||||
CPU1_OVERHEAT () { [ $CPU1_TEMPERATURE -gt $CPU_TEMPERATURE_TRESHOLD ]; }
|
||||
CPU2_OVERHEAT () { [ $CPU2_TEMPERATURE -gt $CPU_TEMPERATURE_TRESHOLD ]; }
|
||||
|
||||
# Define functions to check if CPU 1 and CPU 2 temperatures are above the threshold
|
||||
function CPU1_OVERHEAT () { [ $CPU1_TEMPERATURE -gt $CPU_TEMPERATURE_THRESHOLD ]; }
|
||||
if $IS_CPU2_TEMPERATURE_SENSOR_PRESENT
|
||||
then
|
||||
function CPU2_OVERHEAT () { [ $CPU2_TEMPERATURE -gt $CPU_TEMPERATURE_THRESHOLD ]; }
|
||||
fi
|
||||
|
||||
# Initialize a variable to store the comments displayed when the fan control profile changed
|
||||
COMMENT=" -"
|
||||
# Check if CPU 1 is overheating then apply Dell default dynamic fan control profile if true
|
||||
if CPU1_OVERHEAT
|
||||
then
|
||||
apply_Dell_fan_control_profile
|
||||
apply_Dell_profile
|
||||
|
||||
if ! $IS_DELL_FAN_CONTROL_PROFILE_APPLIED
|
||||
if ! $IS_DELL_PROFILE_APPLIED
|
||||
then
|
||||
IS_DELL_FAN_CONTROL_PROFILE_APPLIED=true
|
||||
IS_DELL_PROFILE_APPLIED=true
|
||||
|
||||
# If CPU 2 temperature sensor is present, check if it is overheating too.
|
||||
# Do not apply Dell default dynamic fan control profile as it has already been applied before
|
||||
if $IS_CPU2_TEMPERATURE_SENSOR_PRESENT && CPU2_OVERHEAT
|
||||
if CPU2_OVERHEAT
|
||||
then
|
||||
COMMENT="CPU 1 and CPU 2 temperatures are too high, Dell default dynamic fan control profile applied for safety"
|
||||
COMMENT="CPU 1 and CPU 2 temperatures are too high. Dell default dynamic fan control profile applied."
|
||||
else
|
||||
COMMENT="CPU 1 temperature is too high, Dell default dynamic fan control profile applied for safety"
|
||||
COMMENT="CPU 1 temperature is too high. Dell default dynamic fan control profile applied."
|
||||
fi
|
||||
fi
|
||||
# If CPU 2 temperature sensor is present, check if it is overheating then apply Dell default dynamic fan control profile if true
|
||||
elif $IS_CPU2_TEMPERATURE_SENSOR_PRESENT && CPU2_OVERHEAT
|
||||
elif CPU2_OVERHEAT
|
||||
then
|
||||
apply_Dell_fan_control_profile
|
||||
apply_Dell_profile
|
||||
|
||||
if ! $IS_DELL_FAN_CONTROL_PROFILE_APPLIED
|
||||
if ! $IS_DELL_PROFILE_APPLIED
|
||||
then
|
||||
IS_DELL_FAN_CONTROL_PROFILE_APPLIED=true
|
||||
COMMENT="CPU 2 temperature is too high, Dell default dynamic fan control profile applied for safety"
|
||||
IS_DELL_PROFILE_APPLIED=true
|
||||
COMMENT="CPU 2 temperature is too high. Dell default dynamic fan control profile applied."
|
||||
fi
|
||||
else
|
||||
apply_user_fan_control_profile
|
||||
apply_user_profile
|
||||
|
||||
# Check if user fan control profile is applied then apply it if not
|
||||
if $IS_DELL_FAN_CONTROL_PROFILE_APPLIED
|
||||
if $IS_DELL_PROFILE_APPLIED
|
||||
then
|
||||
IS_DELL_FAN_CONTROL_PROFILE_APPLIED=false
|
||||
COMMENT="CPU temperature decreased and is now OK (<= $CPU_TEMPERATURE_THRESHOLD°C), user's fan control profile applied."
|
||||
COMMENT="CPU temperature decreased and is now OK (<= $CPU_TEMPERATURE_TRESHOLD°C). User's fan control profile applied."
|
||||
IS_DELL_PROFILE_APPLIED=false
|
||||
fi
|
||||
fi
|
||||
|
||||
# Enable or disable, depending on the user's choice, third-party PCIe card Dell default cooling response
|
||||
# No comment will be displayed on the change of this parameter since it is not related to the temperature of any device (CPU, GPU, etc...) but only to the settings made by the user when launching this Docker container
|
||||
if $DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE
|
||||
if [ $i -ge $TABLE_HEADER_PRINT_INTERVAL ]
|
||||
then
|
||||
disable_third_party_PCIe_card_Dell_default_cooling_response
|
||||
THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE_STATUS="Disabled"
|
||||
else
|
||||
enable_third_party_PCIe_card_Dell_default_cooling_response
|
||||
THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE_STATUS="Enabled"
|
||||
fi
|
||||
|
||||
# Print temperatures, active fan control profile and comment if any change happened during last time interval
|
||||
if [ $i -eq $TABLE_HEADER_PRINT_INTERVAL ]
|
||||
then
|
||||
echo " ------- Temperatures -------"
|
||||
echo " Date & time Inlet CPU 1 CPU 2 Exhaust Active fan speed profile Third-party PCIe card Dell default cooling response Comment"
|
||||
echo " ------- Temperatures -------"
|
||||
echo " Date & time Inlet CPU 1 CPU 2 Exhaust Active fan speed profile Comment"
|
||||
i=0
|
||||
fi
|
||||
printf "%19s %3d°C %3d°C %3s°C %5s°C %40s %51s %s\n" "$(date +"%d-%m-%Y %T")" $INLET_TEMPERATURE $CPU1_TEMPERATURE "$CPU2_TEMPERATURE" "$EXHAUST_TEMPERATURE" "$CURRENT_FAN_CONTROL_PROFILE" "$THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE_STATUS" "$COMMENT"
|
||||
printf "%12s %3d°C %3d°C %3d°C %5d°C %40s %s\n" "$(date +"%d-%m-%y %H:%M:%S")" $INLET_TEMPERATURE $CPU1_TEMPERATURE $CPU2_TEMPERATURE $EXHAUST_TEMPERATURE "$CURRENT_FAN_CONTROL_PROFILE" "$COMMENT"
|
||||
|
||||
((i++))
|
||||
wait $SLEEP_PROCESS_PID
|
||||
sleep $CHECK_INTERVAL &
|
||||
wait $!
|
||||
done
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
FROM ubuntu:latest
|
||||
|
||||
LABEL org.opencontainers.image.authors="tigerblue77"
|
||||
MAINTAINER tigerblue77
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
@ -16,8 +16,7 @@ ENV IDRAC_HOST local
|
||||
#ENV IDRAC_USERNAME root
|
||||
#ENV IDRAC_PASSWORD calvin
|
||||
ENV FAN_SPEED 5
|
||||
ENV CPU_TEMPERATURE_THRESHOLD 50
|
||||
ENV CPU_TEMPERATURE_TRESHOLD 50
|
||||
ENV CHECK_INTERVAL 60
|
||||
ENV DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE false
|
||||
|
||||
CMD ["/Dell_iDRAC_fan_controller.sh"]
|
||||
|
||||
80
README.md
80
README.md
@ -1,11 +1,6 @@
|
||||
<div id="top"></div>
|
||||
|
||||
> **Warning** If you update to the latest version, be sure to replace "CPU_TEMPERATURE_TRESHOLD" environment variable with "CPU_TEMPERATURE_T<ins>H</ins>RESHOLD" which was a typo
|
||||
|
||||
# Dell iDRAC fan controller Docker image
|
||||
Download Docker image from :
|
||||
- [Docker Hub](https://hub.docker.com/r/tigerblue77/dell_idrac_fan_controller)
|
||||
- [GitHub Containers Repository](https://github.com/tigerblue77/Dell_iDRAC_fan_controller_Docker/pkgs/container/dell_idrac_fan_controller)
|
||||
|
||||
<!-- TABLE OF CONTENTS -->
|
||||
<details>
|
||||
@ -14,46 +9,13 @@ Download Docker image from :
|
||||
<li><a href="#container-console-log-example">Container console log example</a></li>
|
||||
<li><a href="#usage">Usage</a></li>
|
||||
<li><a href="#parameters">Parameters</a></li>
|
||||
<li><a href="#troubleshooting">Troubleshooting</a></li>
|
||||
<li><a href="#contributing">Contributing</a></li>
|
||||
</ol>
|
||||
</details>
|
||||
|
||||
## Container console log example
|
||||
|
||||

|
||||
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
|
||||
<!-- PREREQUISITES -->
|
||||
## Prerequisites
|
||||
### iDRAC version
|
||||
|
||||
This Docker container only works on Dell PowerEdge servers that support IPMI commands, i.e. < iDRAC 9 firmware 3.30.30.30.
|
||||
|
||||
### To access iDRAC over LAN (not needed in "local" mode) :
|
||||
|
||||
1. Log into your iDRAC web console
|
||||
|
||||

|
||||
|
||||
2. In the left side menu, expand "iDRAC settings", click "Network" then click "IPMI Settings" link at the top of the web page.
|
||||
|
||||

|
||||
|
||||
3. Check the "Enable IPMI over LAN" checkbox then click "Apply" button.
|
||||
|
||||

|
||||
|
||||
4. Test access to IPMI over LAN running the following commands :
|
||||
```bash
|
||||
apt -y install ipmitool
|
||||
ipmitool -I lanplus \
|
||||
-H <iDRAC IP address> \
|
||||
-U <iDRAC username> \
|
||||
-P <iDRAC password> \
|
||||
sdr elist all
|
||||
```
|
||||

|
||||
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
|
||||
@ -67,11 +29,9 @@ docker run -d \
|
||||
--name Dell_iDRAC_fan_controller \
|
||||
--restart=unless-stopped \
|
||||
-e IDRAC_HOST=local \
|
||||
-e FAN_SPEED=<decimal or hexadecimal fan speed> \
|
||||
-e CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold> \
|
||||
-e FAN_SPEED=<dec or hex fan speed> \
|
||||
-e CPU_TEMPERATURE_TRESHOLD=<dec temperature treshold> \
|
||||
-e CHECK_INTERVAL=<seconds between each check> \
|
||||
-e DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false> \
|
||||
--device=/dev/ipmi0:/dev/ipmi0:rw \
|
||||
tigerblue77/dell_idrac_fan_controller:latest
|
||||
```
|
||||
|
||||
@ -81,13 +41,12 @@ docker run -d \
|
||||
docker run -d \
|
||||
--name Dell_iDRAC_fan_controller \
|
||||
--restart=unless-stopped \
|
||||
-e IDRAC_HOST=<iDRAC IP address> \
|
||||
-e IDRAC_HOST=<iDRAC host IP> \
|
||||
-e IDRAC_USERNAME=<iDRAC username> \
|
||||
-e IDRAC_PASSWORD=<iDRAC password> \
|
||||
-e FAN_SPEED=<decimal or hexadecimal fan speed> \
|
||||
-e CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold> \
|
||||
-e FAN_SPEED=<dec or hex fan speed> \
|
||||
-e CPU_TEMPERATURE_TRESHOLD=<dec temperature treshold> \
|
||||
-e CHECK_INTERVAL=<seconds between each check> \
|
||||
-e DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false> \
|
||||
tigerblue77/dell_idrac_fan_controller:latest
|
||||
```
|
||||
|
||||
@ -105,12 +64,11 @@ services:
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- IDRAC_HOST=local
|
||||
- FAN_SPEED=<decimal or hexadecimal fan speed>
|
||||
- CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold>
|
||||
- FAN_SPEED=<dec or hex fan speed>
|
||||
- CPU_TEMPERATURE_TRESHOLD=<dec temperature treshold>
|
||||
- CHECK_INTERVAL=<seconds between each check>
|
||||
- DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false>
|
||||
devices:
|
||||
- /dev/ipmi0:/dev/ipmi0:rw
|
||||
- /dev/ipmi0:/dev/ipmi0
|
||||
```
|
||||
|
||||
2. to use with LAN iDRAC:
|
||||
@ -127,10 +85,9 @@ services:
|
||||
- IDRAC_HOST=<iDRAC IP address>
|
||||
- IDRAC_USERNAME=<iDRAC username>
|
||||
- IDRAC_PASSWORD=<iDRAC password>
|
||||
- FAN_SPEED=<decimal or hexadecimal fan speed>
|
||||
- CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold>
|
||||
- FAN_SPEED=<dec or hex fan speed>
|
||||
- CPU_TEMPERATURE_TRESHOLD=<dec temperature treshold>
|
||||
- CHECK_INTERVAL=<seconds between each check>
|
||||
- DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false>
|
||||
```
|
||||
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
@ -143,20 +100,9 @@ All parameters are optional as they have default values (including default iDRAC
|
||||
- `IDRAC_HOST` parameter can be set to "local" or to your distant iDRAC's IP address. **Default** value is "local".
|
||||
- `IDRAC_USERNAME` parameter is only necessary if you're adressing a distant iDRAC. **Default** value is "root".
|
||||
- `IDRAC_PASSWORD` parameter is only necessary if you're adressing a distant iDRAC. **Default** value is "calvin".
|
||||
- `FAN_SPEED` parameter can be set as a decimal (from 0 to 100%) or hexadecimaladecimal value (from 0x00 to 0x64) you want to set the fans to. **Default** value is 5(%).
|
||||
- `CPU_TEMPERATURE_THRESHOLD` parameter is the T°junction (junction temperature) threshold beyond which the Dell fan mode defined in your BIOS will become active again (to protect the server hardware against overheat). **Default** value is 50(°C).
|
||||
- `FAN_SPEED` parameter can be set as a decimal (from 0 to 100%) or hexadecimal value (from 0x00 to 0x64) you want to set the fans to. **Default** value is 5(%).
|
||||
- `CPU_TEMPERATURE_TRESHOLD` parameter is the T°junction (junction temperature) threshold beyond which the Dell fan mode defined in your BIOS will become active again (to protect the server hardware against overheat). **Default** value is 50(°C).
|
||||
- `CHECK_INTERVAL` parameter is the time (in seconds) between each temperature check and potential profile change. **Default** value is 60(s).
|
||||
- `DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE` parameter is a boolean that allows to disable third-party PCIe card Dell default cooling response. **Default** value is false.
|
||||
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
|
||||
<!-- TROUBLESHOOTING -->
|
||||
## Troubleshooting
|
||||
|
||||
If your server frequently switches back to the default Dell fan mode:
|
||||
1. Check `Tcase` (case temperature) of your CPU on Intel Ark website and then set `CPU_TEMPERATURE_THRESHOLD` to a slightly lower value. Example with my CPUs ([Intel Xeon E5-2630L v2](https://www.intel.com/content/www/us/en/products/sku/75791/intel-xeon-processor-e52630l-v2-15m-cache-2-40-ghz/specifications.html)) : Tcase = 63°C, I set `CPU_TEMPERATURE_THRESHOLD` to 60(°C).
|
||||
2. If it's already good, adapt your `FAN_SPEED` value to increase the airflow and thus further decrease the temperature of your CPU(s)
|
||||
3. If neither increasing the fan speed nor increasing the threshold solves your problem, then it may be time to replace your thermal paste
|
||||
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user