Merge pull request #58 from rw15e/feature/third_party_pcie_default_flag
Feature/third party pcie default flag
This commit is contained in:
commit
8610b3bd75
4 changed files with 16 additions and 4 deletions
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
source functions.sh
|
||||
|
||||
# Trap the signals for container exit and run gracefull_exit function
|
||||
trap 'gracefull_exit' SIGQUIT SIGKILL SIGTERM
|
||||
# Trap the signals for container exit and run graceful_exit function
|
||||
trap 'graceful_exit' SIGQUIT SIGTERM
|
||||
|
||||
# Prepare, format and define initial variables
|
||||
|
||||
|
|
|
|||
|
|
@ -25,5 +25,6 @@ ENV FAN_SPEED 5
|
|||
ENV CPU_TEMPERATURE_THRESHOLD 50
|
||||
ENV CHECK_INTERVAL 60
|
||||
ENV DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE false
|
||||
ENV KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT false
|
||||
|
||||
CMD ["./Dell_iDRAC_fan_controller.sh"]
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ docker run -d \
|
|||
-e CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold> \
|
||||
-e CHECK_INTERVAL=<seconds between each check> \
|
||||
-e DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false> \
|
||||
-e KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT=<true or false> \
|
||||
--device=/dev/ipmi0:/dev/ipmi0:rw \
|
||||
tigerblue77/dell_idrac_fan_controller:latest
|
||||
```
|
||||
|
|
@ -98,6 +99,7 @@ docker run -d \
|
|||
-e CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold> \
|
||||
-e CHECK_INTERVAL=<seconds between each check> \
|
||||
-e DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false> \
|
||||
-e KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT=<true or false> \
|
||||
tigerblue77/dell_idrac_fan_controller:latest
|
||||
```
|
||||
|
||||
|
|
@ -119,6 +121,7 @@ services:
|
|||
- CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold>
|
||||
- CHECK_INTERVAL=<seconds between each check>
|
||||
- DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false>
|
||||
- KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT=<true or false>
|
||||
devices:
|
||||
- /dev/ipmi0:/dev/ipmi0:rw
|
||||
```
|
||||
|
|
@ -141,6 +144,7 @@ services:
|
|||
- CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold>
|
||||
- CHECK_INTERVAL=<seconds between each check>
|
||||
- DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false>
|
||||
- KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT=<true or false>
|
||||
```
|
||||
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
|
|
@ -157,6 +161,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).
|
||||
- `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.
|
||||
- `KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT` parameter is a boolean that allows to keep the third-party PCIe card Dell default cooling response state upon exit. **Default** value is false, so that it resets the third-party PCIe card Dell default cooling response to Dell default.
|
||||
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
|
||||
|
|
|
|||
10
functions.sh
10
functions.sh
|
|
@ -86,9 +86,15 @@ function disable_third_party_PCIe_card_Dell_default_cooling_response () {
|
|||
# }
|
||||
|
||||
# Prepare traps in case of container exit
|
||||
function gracefull_exit () {
|
||||
function graceful_exit () {
|
||||
apply_Dell_fan_control_profile
|
||||
enable_third_party_PCIe_card_Dell_default_cooling_response
|
||||
|
||||
# Reset third-party PCIe card cooling response to Dell default depending on the user's choice at startup
|
||||
if ! $KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT
|
||||
then
|
||||
enable_third_party_PCIe_card_Dell_default_cooling_response
|
||||
fi
|
||||
|
||||
echo "/!\ WARNING /!\ Container stopped, Dell default dynamic fan control profile applied for safety."
|
||||
exit 0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue