commit
e22efc3d4e
2 changed files with 28 additions and 10 deletions
|
|
@ -46,6 +46,18 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If server model is Gen 14 (*40) or newer
|
||||||
|
if [[ $SERVER_MODEL =~ .*[RT][[:space:]]?[0-9][4-9]0.* ]]
|
||||||
|
then
|
||||||
|
DELL_POWEREDGE_GEN_14_OR_NEWER=true
|
||||||
|
CPU1_TEMPERATURE_INDEX=2
|
||||||
|
CPU2_TEMPERATURE_INDEX=4
|
||||||
|
else
|
||||||
|
DELL_POWEREDGE_GEN_14_OR_NEWER=false
|
||||||
|
CPU1_TEMPERATURE_INDEX=1
|
||||||
|
CPU2_TEMPERATURE_INDEX=2
|
||||||
|
fi
|
||||||
|
|
||||||
# Log main informations
|
# Log main informations
|
||||||
echo "Server model: $SERVER_MANUFACTURER $SERVER_MODEL"
|
echo "Server model: $SERVER_MANUFACTURER $SERVER_MODEL"
|
||||||
echo "iDRAC/IPMI host: $IDRAC_HOST"
|
echo "iDRAC/IPMI host: $IDRAC_HOST"
|
||||||
|
|
@ -138,15 +150,19 @@ while true; do
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable or disable, depending on the user's choice, third-party PCIe card Dell default cooling response
|
# If server model is Gen 14 (*40) or newer
|
||||||
# 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 ! $DELL_POWEREDGE_GEN_14_OR_NEWER
|
||||||
if $DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE
|
|
||||||
then
|
then
|
||||||
disable_third_party_PCIe_card_Dell_default_cooling_response
|
# Enable or disable, depending on the user's choice, third-party PCIe card Dell default cooling response
|
||||||
THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE_STATUS="Disabled"
|
# 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
|
||||||
else
|
if $DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE
|
||||||
enable_third_party_PCIe_card_Dell_default_cooling_response
|
then
|
||||||
THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE_STATUS="Enabled"
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Print temperatures, active fan control profile and comment if any change happened during last time interval
|
# Print temperatures, active fan control profile and comment if any change happened during last time interval
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,10 @@ 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;}')
|
CPU1_TEMPERATURE=$(echo $CPU_DATA | awk "{print \$$CPU1_TEMPERATURE_INDEX;}")
|
||||||
if $IS_CPU2_TEMPERATURE_SENSOR_PRESENT
|
if $IS_CPU2_TEMPERATURE_SENSOR_PRESENT
|
||||||
then
|
then
|
||||||
CPU2_TEMPERATURE=$(echo $CPU_DATA | awk '{print $2;}')
|
CPU2_TEMPERATURE=$(echo $CPU_DATA | awk "{print \$$CPU2_TEMPERATURE_INDEX;}")
|
||||||
else
|
else
|
||||||
CPU2_TEMPERATURE="-"
|
CPU2_TEMPERATURE="-"
|
||||||
fi
|
fi
|
||||||
|
|
@ -58,11 +58,13 @@ function retrieve_temperatures () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# /!\ Use this function only for Gen 13 and older generation servers /!\
|
||||||
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
|
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00 > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# /!\ Use this function only for Gen 13 and older generation servers /!\
|
||||||
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
|
ipmitool -I $IDRAC_LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00 > /dev/null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue