This commit is contained in:
Sean Cline 2023-03-22 00:18:01 +00:00 committed by GitHub
commit 5b0185789b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 4 deletions

View File

@ -35,10 +35,24 @@ function retrieve_temperatures () {
# Parse CPU data # Parse CPU data
local CPU_DATA=$(echo "$DATA" | grep "3\." | grep -Po '\d{2}') local CPU_DATA=$(echo "$DATA" | grep "3\." | grep -Po '\d{2}')
CPU1_TEMPERATURE=$(echo $CPU_DATA | awk '{print $1;}') if $DELL_14_GEN
then
# 14 Gen server
CPU1_TEMPERATURE=$(echo $CPU_DATA | awk '{print $2;}')
else
# 14 Gen or older
CPU1_TEMPERATURE=$(echo $CPU_DATA | awk '{print $1;}')
fi
if $IS_CPU2_TEMPERATURE_SENSOR_PRESENT if $IS_CPU2_TEMPERATURE_SENSOR_PRESENT
then then
CPU2_TEMPERATURE=$(echo $CPU_DATA | awk '{print $2;}') if $DELL_14_GEN
then
# 14 Gen server
CPU2_TEMPERATURE=$(echo $CPU_DATA | awk '{print $4;}')
else
# 14 Gen or older
CPU2_TEMPERATURE=$(echo $CPU_DATA | awk '{print $2;}')
fi
else else
CPU2_TEMPERATURE="-" CPU2_TEMPERATURE="-"
fi fi
@ -57,12 +71,20 @@ function retrieve_temperatures () {
function enable_third_party_PCIe_card_Dell_default_cooling_response () { 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 # 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 if ! $DELL_14_GEN
then
# 13 Gen or older server
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00 > /dev/null
fi
} }
function disable_third_party_PCIe_card_Dell_default_cooling_response () { 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 # 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 if ! $DELL_14_GEN
then
# 13 Gen or older server
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00 > /dev/null
fi
} }
# Returns : # Returns :

View File

@ -15,6 +15,7 @@ RUN chmod 0777 /Dell_iDRAC_fan_controller.sh
ENV IDRAC_HOST local ENV IDRAC_HOST local
#ENV IDRAC_USERNAME root #ENV IDRAC_USERNAME root
#ENV IDRAC_PASSWORD calvin #ENV IDRAC_PASSWORD calvin
ENV DELL_14_GEN false
ENV FAN_SPEED 5 ENV FAN_SPEED 5
ENV CPU_TEMPERATURE_THRESHOLD 50 ENV CPU_TEMPERATURE_THRESHOLD 50
ENV CHECK_INTERVAL 60 ENV CHECK_INTERVAL 60

View File

@ -147,6 +147,7 @@ All parameters are optional as they have default values (including default iDRAC
- `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). - `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).
- `CHECK_INTERVAL` parameter is the time (in seconds) between each temperature check and potential profile change. **Default** value is 60(s). - `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. - `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.
- `DELL_14_GEN` parameter that disabled 3rd party PCI calls and outputs CPU temperatures correctly for 14th Gen Dell servers, ex Dell r640, 740 series. Must have idrac 3.30.30.30 or older. **Default** value is false.
<p align="right">(<a href="#top">back to top</a>)</p> <p align="right">(<a href="#top">back to top</a>)</p>