This commit is contained in:
2024-02-11 08:51:26 -06:00
parent fb039564d9
commit 25f4207bb5
2 changed files with 1096 additions and 5 deletions

1090
inc/power.inc.bak.sh Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -202,11 +202,12 @@ CHECKPOWER(){
APCPDU_WATT_avg=$(echo ${APCPDU_avg} | cut -d'~' -f 2)
echo -en "\r\033[K"
fi
echo -en "${idsCL[White]}ServerRack Amps ${idsCL[Default]}: ${idsCL[Green]}`IDS_NUMBER_FORMAT ${APCPDU_AMP} 2 yes`'amps"
[ "${avgdays}" != "" ] && echo -e "${idsCL[LightYellow]} `IDS_NUMBER_FORMAT ${APCPDU_AMP_avg}`'amps${idsCL[Default]}" || echo -e "${idsCL[Default]}"
echo -en "${idsCL[White]}ServerRack Wattage ${idsCL[Default]}: ${idsCL[Green]}`IDS_NUMBER_FORMAT ${APCPDU_WATT} 0`'watts ${idsCL[Default]}~ est"
[ "${avgdays}" != "" ] && echo -e "${idsCL[LightYellow]} `IDS_NUMBER_FORMAT ${APCPDU_WATT_avg} 0`'watts${idsCL[Default]}" || echo -e " ${idsCL[LightCyan]}(`IDS_NUMBER_FORMAT ${APCPDU_WATT2}` watts)${idsCL[Default]}"
wspc=20
AD=$(IDS_NUMBER_FORMAT ${APCPDU_AMP} 2 yes)
c=0; spc=''; spc1=`expr ${wspc} - ${#AD}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; ((c++)); done
echo -en "${idsCL[White]}ServerRack ${idsCL[Default]}: ${idsCL[Green]}${AD}'amps${spc}${idsCL[Green]}`IDS_NUMBER_FORMAT ${APCPDU_WATT} 0`'watts ${idsCL[Default]}~ est"
DIVIDER . lightCyan ${PRI_WIDTH}
if [ "${avgdays}" != "" ]; then
echo -en "${idsCL[Yellow]}Calculating NetworkRack Averages ... "