From 684ed236d5d4220c6206bee9bf669cbafb31f3b5 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 25 May 2024 23:22:49 -0500 Subject: [PATCH] update --- defaults.inc | 2 +- powerwall.sh | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/defaults.inc b/defaults.inc index 7c9553ba..3f4f6f7b 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='2.7.54-05242024' +VERS='2.7.55-05252024' noheader=' update service dailytemp confsync -r -report ' diff --git a/powerwall.sh b/powerwall.sh index 5c99f441..89c51b79 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -478,6 +478,19 @@ SHUTDOWN_SERVER(){ touch ${PW_TMPFOLDER}/maintmode.${ESXI_HOST} fi + ##DECREASE CPU OVERCOMMIT + if [[ "${PW_OFFSITE_HOSTS}" != *"${ESXI_HOST}"* ]] && [ "${ESXI_HOST}" != "OFFSITE" ]; then + MSG="Decreasing DRS CPU-Overcommit back down to 2" + c=0; MSG_SPC=''; spc1=`expr ${HC_CW} - ${#MSG}`; until [ ${c} = ${spc1} ]; do MSG_SPC="${MSG_SPC} "; ((c++)); done + echo -en "${idsCL[White]}${MSG}${MSG_SPC}: " + if [ "${TEST}" != "true" ]; then + ${PW_FOLDER}/esxi-scripts/set-drs.ps1 2 >/dev/null 2>&1 & + echo -e "${idsCL[Green]}Command Sent${idsCL[Default]}\n" + else + echo -e "${idsCL[Yellow]}(TEST MODE)${idsCL[Default]}\n" + fi + fi + else echo -e "${idsCL[LightRed]}Host cannot be found for '${1}'${idsCL[Default]}" fi