From 7edc471d09d29c020b122c97d8060da14c482772 Mon Sep 17 00:00:00 2001 From: Louis Pires Date: Wed, 1 Feb 2023 13:40:57 +0200 Subject: [PATCH] Added disable and enable_third_party_profiles --- Dell_iDRAC_fan_controller.sh | 17 +++++++++++++++++ Dockerfile | 1 + README.md | 5 +++++ 3 files changed, 23 insertions(+) diff --git a/Dell_iDRAC_fan_controller.sh b/Dell_iDRAC_fan_controller.sh index 0bab993..ea47f07 100644 --- a/Dell_iDRAC_fan_controller.sh +++ b/Dell_iDRAC_fan_controller.sh @@ -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 diff --git a/Dockerfile b/Dockerfile index 56f1870..898e8ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/README.md b/README.md index 26813f8..7087e1b 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ docker run -d \ -e FAN_SPEED= \ -e CPU_TEMPERATURE_TRESHOLD= \ -e CHECK_INTERVAL= \ + -e DISABLE_THIRD_PARTY= \ --device=/dev/ipmi0:/dev/ipmi0:rw \ tigerblue77/dell_idrac_fan_controller:latest ``` @@ -77,6 +78,7 @@ docker run -d \ -e FAN_SPEED= \ -e CPU_TEMPERATURE_TRESHOLD= \ -e CHECK_INTERVAL= \ + -e DISABLE_THIRD_PARTY= \ tigerblue77/dell_idrac_fan_controller:latest ``` @@ -97,6 +99,7 @@ services: - FAN_SPEED= - CPU_TEMPERATURE_TRESHOLD= - CHECK_INTERVAL= + - DISABLE_THIRD_PARTY= devices: - /dev/ipmi0:/dev/ipmi0:rw ``` @@ -118,6 +121,7 @@ services: - FAN_SPEED= - CPU_TEMPERATURE_TRESHOLD= - CHECK_INTERVAL= + - DISABLE_THIRD_PARTY= ```

(back to top)

@@ -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.

(back to top)