This commit is contained in:
2023-10-30 23:45:21 -05:00
parent 161cee3bea
commit a8c93306a5
2 changed files with 7 additions and 8 deletions

View File

@@ -100,12 +100,11 @@ PW_ESXI_HOST_NAMES['10.2.1.18']='iDS-vMS2-Offsite.scity.us'
PW_ESXI_HOST_NAMES['10.2.1.11']='iDS-vMS1.Offsite.scity.us'
declare -A PW_iDRACHOST_SHORTNAMES
PW_iDRACHOST_SHORTNAMES['10.10.2.10']='iDS-vMS-Host0'
PW_iDRACHOST_SHORTNAMES['10.10.2.11']='iDS-vMS-Host1'
PW_iDRACHOST_SHORTNAMES['10.10.2.12']='iDS-vMS-Host2'
PW_iDRACHOST_SHORTNAMES['10.10.2.16']='iDS-vMS-Host6'
PW_iDRACHOST_SHORTNAMES['10.10.2.17']='iDS-vMS-Host7'
PW_iDRACHOST_SHORTNAMES['10.2.1.11']='OFF-vMS-Host1'
PW_iDRACHOST_SHORTNAMES['10.10.2.20']='iDS-vMS-Host0'
PW_iDRACHOST_SHORTNAMES['10.10.2.21']='iDS-vMS-Host1'
PW_iDRACHOST_SHORTNAMES['10.10.2.26']='iDS-vMS-Host6'
PW_iDRACHOST_SHORTNAMES['10.10.2.27']='iDS-vMS-Host7'
PW_iDRACHOST_SHORTNAMES['10.2.1.21']='OFF-vMS-Host1'
PW_VCENTERHOST=10.10.1.30
PW_MAINHOSTS=10.10.2.10,10.10.2.11

View File

@@ -552,10 +552,10 @@ CHECKPOWER(){
echo
for ESXIHOST in "${PW_HOST_IDRACS[@]}"; do
echo "HERE: $ESXIHOST"
vHOSTPOWER=$(ssh root@${PW_RACADM_ACCESS} racadm -r ${ESXIHOST} -u ${PW_ESXI_USER} -p "'${PW_ESXI_PASS}'" getsensorinfo | grep "System Board Pwr" 2>&1)
watts=$(echo ${vHOSTPOWER} | awk '/ / {print $6}' | sed -e 's/Watts//g')
echo -e "${idsCL[LightCyan]}vMS-Host ${PW_iDRACHOST_SHORTNAMES[${ESXIHOST}]} ${idsCL[Default]}: ${idsCL[Green]}${watts}W${idsCL[Default]}"
echo -e "${idsCL[LightCyan]}ESXi HOST '${PW_iDRACHOST_SHORTNAMES[${ESXIHOST}]}'${idsCL[Default]}: ${idsCL[Green]}${watts}W${idsCL[Default]}"
done
[ "${action}" != "" ] && echo