From ccf763a6414f4e357b4a0206496df4c5ef8e990e Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 27 Jan 2024 19:52:19 -0600 Subject: [PATCH] update --- esxi-scripts/set-drs.ps1 | 7 ++++++- inc/temp.inc.sh | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/esxi-scripts/set-drs.ps1 b/esxi-scripts/set-drs.ps1 index 6dd9fc65..53667316 100755 --- a/esxi-scripts/set-drs.ps1 +++ b/esxi-scripts/set-drs.ps1 @@ -1,9 +1,11 @@ #!/usr/bin/env pwsh - . /opt/idssys/powerwall/settings.ps1 +Write-Progress -Activity "Connecting to vCenter [$VCENTERHOST] ..." -PercentComplete 20 + Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null +Write-Progress -Activity "Connected! Setting the new DRS Max vCPU ..." -PercentComplete 70 $spec = New-Object VMware.Vim.ClusterConfigSpecEx $spec.DrsConfig = New-Object VMware.Vim.ClusterDrsConfigInfo @@ -17,7 +19,10 @@ $cluster_ID= Get-Cluster -Name "iDS-Cluster" $_this = Get-View -Id $cluster_ID.Id $_this.ReconfigureComputeResource_Task($spec, $true) +Write-Progress -Activity "Refreshing DRS and invoking any DRS Recommendations ..." -PercentComplete 90 + Get-Cluster -Name "iDS-Cluster" | Get-DrsRecommendation -Refresh | Invoke-DrsRecommendation +Write-Progress -Activity "Done" -Completed Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false \ No newline at end of file diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 444e117d..3a6492f3 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -542,7 +542,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 2 | read temp_crit echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 3 | read temp_crit_sys - + echo "HERE: ${SENSORa} - ${vSENSOR}" if [[ "${vSENSOR}" = *"Exhaust"* ]]; then if [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[${SENSORa}]}"* ]]; then if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set)) -ge 600 ]; then