From 0082c342eef76686aa9b13ffab34ba2a1117f11e Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 11 Feb 2024 11:14:55 -0600 Subject: [PATCH] Update power.inc.sh --- inc/power.inc.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/power.inc.sh b/inc/power.inc.sh index 6f303f78..80d8c0c3 100644 --- a/inc/power.inc.sh +++ b/inc/power.inc.sh @@ -354,8 +354,8 @@ CHECKPOWER(){ DIVIDER . yellow ${PRI_WIDTH} echo -en "${idsCL[Yellow]}ESXi Host Power Information" [ "${avgdays}" != "" ] && echo -e " --${idsCL[LightYellow]}${avgdays_disp}-Averages---" || echo - echo -en "${idsCL[LightCyan]} Amps Watts" - [ "${avgdays}" != "" ] && echo -e " Amps Watts" || echo + # echo -en "${idsCL[LightCyan]} Amps Watts" + # [ "${avgdays}" != "" ] && echo -e " Amps Watts" || echo DIVIDER . yellow ${PRI_WIDTH} SENSOR_TOTAL_WATTS_MAINSITE=0 @@ -401,7 +401,7 @@ CHECKPOWER(){ [ "${PS2}" != "0.0" ] && PS2=`echo "scale=1; ${PS2}/10" | bc` && (( $(bc <<<"${PS2} < 1") )) && [[ "${PS2}" = *"."* ]] && PS2="0${PS2}" HOST_AMPS=`echo "scale=1; ${PS1}+${PS2}" | bc` AD=$(IDS_NUMBER_FORMAT ${HOST_AMPS} 2 yes); c=0; spc=''; spc1=`expr ${wspc} - ${#AD}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; ((c++)); done - HOST_WATTS_disp="${idsCL[Green]}${AD}'A${spc}`IDS_NUMBER_FORMAT ${HOST_WATTS} 0`'W" + HOST_WATTS_disp="${idsCL[Green]}${AD}'amps${spc}`IDS_NUMBER_FORMAT ${HOST_WATTS} 0`'watts" elif [ "$(ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SENSOR}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" chassis power status | grep off)" != "" ]; then HOST_WATTS_disp="${idsCL[LightRed]}Host powered down" @@ -450,8 +450,8 @@ CHECKPOWER(){ fi if [ ${HOST_WATTS} -gt 0 ]; then DIVIDER . lightCyan ${PRI_WIDTH} - echo -e "${idsCL[LightCyan]} PS1 ${idsCL[Default]}: ${idsCL[LightCyan]}${PS1}'A @ ${PS1V}'V" - echo -e "${idsCL[LightCyan]} PS2 ${idsCL[Default]}: ${idsCL[LightCyan]}${PS2}'A @ ${PS2V}'V" + echo -e "${idsCL[LightCyan]} PS1 ${idsCL[Default]}: ${idsCL[LightCyan]}${PS1}'amps ${idsCL[Default]}@${idsCL[LightCyan]}${PS1} ${PS1V}'volts" + echo -e "${idsCL[LightCyan]} PS2 ${idsCL[Default]}: ${idsCL[LightCyan]}${PS2}'amps ${idsCL[Default]}@${idsCL[LightCyan]}${PS1} ${PS2V}'volts" fi echo -e "${idsCL[Default]}" fi