Update power.inc.sh
This commit is contained in:
@@ -458,8 +458,7 @@ CHECKPOWER(){
|
||||
[ "${PS1}" != "0.0" ] && PS1=`echo "scale=1; ${PS1}/10" | bc` && (( $(bc <<<"${PS1} < 1") )) && [[ "${PS1}" = *"."* ]] && PS1="0${PS1}"
|
||||
[ "${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`
|
||||
[ "${HOST_AMPS}" == "0" ] && AD=0.0 || AD=${HOST_AMPS}
|
||||
c=0; spc=''; spc1=`expr ${wspc} - ${#AD}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; ((c++)); done
|
||||
AD=${HOST_AMPS}; c=0; spc=''; spc1=`expr ${wspc} - ${#AD}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; ((c++)); done
|
||||
HOST_WATTS_disp="${idsCL[Green]}`IDS_NUMBER_FORMAT ${AD} 1`'A${spc}`IDS_NUMBER_FORMAT ${HOST_WATTS} 0`'W"
|
||||
|
||||
elif [ "$(ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SENSOR}]} -U ${PW_ESXI_USER} -P "${ESXI_PASS}" chassis power status | grep off)" != "" ]; then
|
||||
@@ -507,8 +506,8 @@ CHECKPOWER(){
|
||||
|
||||
if [ ${HOST_WATTS} -gt 0 ]; then
|
||||
DIVIDER . darkGray ${PRI_WIDTH}
|
||||
echo -e " PS1 : ${idsCL[Green]}`IDS_NUMBER_FORMAT ${PS1} 1`'amps ${idsCL[Default]}@${idsCL[LightCyan]} ${PS1V}'volts${idsCL[Default]}"
|
||||
echo -e " PS2 : ${idsCL[Green]}`IDS_NUMBER_FORMAT ${PS2} 1`'amps ${idsCL[Default]}@${idsCL[LightCyan]} ${PS2V}'volts${idsCL[Default]}"
|
||||
echo -e " PS1 : ${idsCL[Green]}`IDS_NUMBER_FORMAT ${PS1} 2`'amps ${idsCL[Default]}@${idsCL[LightCyan]} ${PS1V}'volts${idsCL[Default]}"
|
||||
echo -e " PS2 : ${idsCL[Green]}`IDS_NUMBER_FORMAT ${PS2} 2`'amps ${idsCL[Default]}@${idsCL[LightCyan]} ${PS2V}'volts${idsCL[Default]}"
|
||||
fi
|
||||
[ "${SENSOR}" != "OFF-vMS-Host1" ] && DIVIDER . lightCyan ${PRI_WIDTH}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user