Added disable and enable_third_party_profiles

This commit is contained in:
Louis Pires 2023-02-01 13:40:57 +02:00
parent 857a3b3fbc
commit 7edc471d09
3 changed files with 23 additions and 0 deletions

View File

@ -12,9 +12,18 @@ apply_user_profile () {
CURRENT_FAN_CONTROL_PROFILE="User static fan control profile ($DECIMAL_FAN_SPEED%)"
}
disable_third_party_profile () {
ipmitool -I $LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x01 0x00 0x00 > /dev/null
}
enable_third_party_profile () {
ipmitool -I $LOGIN_STRING raw 0x30 0xce 0x00 0x16 0x05 0x00 0x00 0x00 0x05 0x00 0x00 0x00 0x00 > /dev/null
}
# Prepare traps in case of container exit
gracefull_exit () {
apply_Dell_profile
enable_third_party_profile
echo "/!\ WARNING /!\ Container stopped, Dell default dynamic fan control profile applied for safety."
exit 0
}
@ -49,6 +58,14 @@ echo "CPU temperature treshold: $CPU_TEMPERATURE_TRESHOLD°C"
echo "Check interval: ${CHECK_INTERVAL}s"
echo ""
# run on start up to disable third party pci-e fan profile
if [[ $DISABLE_THIRD_PARTY == "true" ]]
then
echo "Disabling Third Party Fan Control: $DISABLE_THIRD_PARTY"
disable_third_party_profile
echo "Disabled"
fi
readonly TABLE_HEADER_PRINT_INTERVAL=10
i=$TABLE_HEADER_PRINT_INTERVAL
IS_DELL_PROFILE_APPLIED=true

View File

@ -18,5 +18,6 @@ ENV IDRAC_HOST local
ENV FAN_SPEED 5
ENV CPU_TEMPERATURE_TRESHOLD 50
ENV CHECK_INTERVAL 60
ENV DISABLE_THIRD_PARTY false
CMD ["/Dell_iDRAC_fan_controller.sh"]

View File

@ -61,6 +61,7 @@ docker run -d \
-e FAN_SPEED=<decimal or hexadecimal fan speed> \
-e CPU_TEMPERATURE_TRESHOLD=<decimal temperature treshold> \
-e CHECK_INTERVAL=<seconds between each check> \
-e DISABLE_THIRD_PARTY=<true or false> \
--device=/dev/ipmi0:/dev/ipmi0:rw \
tigerblue77/dell_idrac_fan_controller:latest
```
@ -77,6 +78,7 @@ docker run -d \
-e FAN_SPEED=<decimal or hexadecimal fan speed> \
-e CPU_TEMPERATURE_TRESHOLD=<decimal temperature treshold> \
-e CHECK_INTERVAL=<seconds between each check> \
-e DISABLE_THIRD_PARTY=<true or false> \
tigerblue77/dell_idrac_fan_controller:latest
```
@ -97,6 +99,7 @@ services:
- FAN_SPEED=<decimal or hexadecimal fan speed>
- CPU_TEMPERATURE_TRESHOLD=<decimal temperature treshold>
- CHECK_INTERVAL=<seconds between each check>
- DISABLE_THIRD_PARTY=<true or false>
devices:
- /dev/ipmi0:/dev/ipmi0:rw
```
@ -118,6 +121,7 @@ services:
- FAN_SPEED=<decimal or hexadecimal fan speed>
- CPU_TEMPERATURE_TRESHOLD=<decimal temperature treshold>
- CHECK_INTERVAL=<seconds between each check>
- DISABLE_THIRD_PARTY=<true or false>
```
<p align="right">(<a href="#top">back to top</a>)</p>
@ -133,6 +137,7 @@ All parameters are optional as they have default values (including default iDRAC
- `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_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` parameter is the boolean to disable the Third-Party PCIe Card Default Cooling Response. **Default** value is false.
<p align="right">(<a href="#top">back to top</a>)</p>