DellEMC S6100: Log HW reboot reason registers (#5361)
This commit is contained in:
parent
1ac146dd97
commit
da3579cf36
@ -77,7 +77,7 @@ _get_smf_reset_register(){
|
|||||||
echo "Third reset - $third_reset" >> $RESET_REASON_FILE
|
echo "Third reset - $third_reset" >> $RESET_REASON_FILE
|
||||||
echo "Fourth reset - $fourth_reset" >> $RESET_REASON_FILE
|
echo "Fourth reset - $fourth_reset" >> $RESET_REASON_FILE
|
||||||
fi
|
fi
|
||||||
|
logger -p user.info -t DELL_S6100_REBOOT_CAUSE "RST value in NVRAM: $first_reset, $second_reset, $third_reset, $fourth_reset"
|
||||||
# Clearing NVRAM values to holding next reset values
|
# Clearing NVRAM values to holding next reset values
|
||||||
nvram_rd_wr.py --set --val 0xee --offset 0x58
|
nvram_rd_wr.py --set --val 0xee --offset 0x58
|
||||||
nvram_rd_wr.py --set --val 0xee --offset 0x5c
|
nvram_rd_wr.py --set --val 0xee --offset 0x5c
|
||||||
@ -147,8 +147,11 @@ update_mailbox_register(){
|
|||||||
|
|
||||||
is_wd_reboot=$(_is_watchdog_reset)
|
is_wd_reboot=$(_is_watchdog_reset)
|
||||||
|
|
||||||
|
por=$(cat $SMF_POWERON_REASON)
|
||||||
|
rst=$(cat $SMF_RESET_REASON)
|
||||||
mbr=$(cat $MAILBOX_POWERON_REASON)
|
mbr=$(cat $MAILBOX_POWERON_REASON)
|
||||||
reason=$(echo $mbr | cut -d 'x' -f2)
|
reason=$(echo $mbr | cut -d 'x' -f2)
|
||||||
|
logger -p user.info -t DELL_S6100_REBOOT_CAUSE "POR: $por, RST: $rst, MBR: $mbr"
|
||||||
if [[ $reason = "ff" ]]; then
|
if [[ $reason = "ff" ]]; then
|
||||||
echo "None" > $REBOOT_REASON_FILE
|
echo "None" > $REBOOT_REASON_FILE
|
||||||
echo 0xbb > $MAILBOX_POWERON_REASON
|
echo 0xbb > $MAILBOX_POWERON_REASON
|
||||||
|
Reference in New Issue
Block a user