Added more comments
This commit is contained in:
parent
01934c1155
commit
7709206447
@ -86,46 +86,45 @@ while true; do
|
|||||||
if CPU1_OVERHEAT
|
if CPU1_OVERHEAT
|
||||||
then
|
then
|
||||||
apply_Dell_profile
|
apply_Dell_profile
|
||||||
|
# Set the flag to indicate that Dell profile is applied
|
||||||
if ! $IS_DELL_PROFILE_APPLIED
|
if ! $IS_DELL_PROFILE_APPLIED
|
||||||
then
|
then
|
||||||
IS_DELL_PROFILE_APPLIED=true
|
IS_DELL_PROFILE_APPLIED=true
|
||||||
|
fi
|
||||||
|
|
||||||
if CPU2_OVERHEAT
|
if CPU2_OVERHEAT
|
||||||
then
|
then
|
||||||
COMMENT="CPU 1 and CPU 2 temperatures are too high. Dell default dynamic fan control profile applied."
|
COMMENT="CPU 1 and CPU 2 temperatures are too high, Dell default dynamic fan control profile applied for safety"
|
||||||
else
|
else
|
||||||
COMMENT="CPU 1 temperature is too high. Dell default dynamic fan control profile applied."
|
COMMENT="CPU 1 temperature is too high, Dell default dynamic fan control profile applied for safety"
|
||||||
fi
|
fi
|
||||||
fi
|
else
|
||||||
elif CPU2_OVERHEAT
|
# Check if CPU2 is overheating and apply Dell profile if true
|
||||||
|
if CPU2_OVERHEAT
|
||||||
then
|
then
|
||||||
apply_Dell_profile
|
apply_Dell_profile
|
||||||
|
|
||||||
if ! $IS_DELL_PROFILE_APPLIED
|
if ! $IS_DELL_PROFILE_APPLIED
|
||||||
then
|
then
|
||||||
IS_DELL_PROFILE_APPLIED=true
|
IS_DELL_PROFILE_APPLIED=true
|
||||||
COMMENT="CPU 2 temperature is too high. Dell default dynamic fan control profile applied."
|
|
||||||
fi
|
fi
|
||||||
|
COMMENT="CPU 2 temperature is too high, Dell default dynamic fan control profile applied for safety"
|
||||||
else
|
else
|
||||||
apply_user_profile
|
# Check if user profile is applied and apply it if not
|
||||||
|
|
||||||
if $IS_DELL_PROFILE_APPLIED
|
if $IS_DELL_PROFILE_APPLIED
|
||||||
then
|
then
|
||||||
COMMENT="CPU temperature decreased and is now OK (<= $CPU_TEMPERATURE_TRESHOLD°C). User's fan control profile applied."
|
apply_user_profile
|
||||||
IS_DELL_PROFILE_APPLIED=false
|
IS_DELL_PROFILE_APPLIED=false
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
# Print temperatures array
|
# Print the results, including the current fan control profile and comment
|
||||||
if [ $i -ge $TABLE_HEADER_PRINT_INTERVAL ]
|
if [ $i -eq $TABLE_HEADER_PRINT_INTERVAL ]
|
||||||
then
|
then
|
||||||
echo " ------- Temperatures -------"
|
echo "Time CPU1 CPU2 Inlet Exhaust Fan Control Profile Comment"
|
||||||
echo " Date & time Inlet CPU 1 CPU 2 Exhaust Active fan speed profile Comment"
|
|
||||||
i=0
|
i=0
|
||||||
fi
|
fi
|
||||||
printf "%12s %3d°C %3d°C %3d°C %5d°C %40s %s\n" "$(date +"%d-%m-%y %H:%M:%S")" $INLET_TEMPERATURE $CPU1_TEMPERATURE $CPU2_TEMPERATURE $EXHAUST_TEMPERATURE "$CURRENT_FAN_CONTROL_PROFILE" "$COMMENT"
|
echo "$(date +%T) $CPU1_TEMPERATURE°C $CPU2_TEMPERATURE°C $INLET_TEMPERATURE°C $EXHAUST_TEMPERATURE°C $CURRENT_FAN_CONTROL_PROFILE $COMMENT"
|
||||||
|
i=$(($i+1))
|
||||||
((i++))
|
|
||||||
wait $SLEEP_PROCESS_PID
|
wait $SLEEP_PROCESS_PID
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user