Skip to content

Commit

Permalink
[generate_dump] call hw-management-generate-dump.sh in collect_cisco_…
Browse files Browse the repository at this point in the history
…8000 (sonic-net#2809)

Signed-off-by: Geert Vlaemynck <[email protected]>
  • Loading branch information
gvlaemyn authored and mssonicbld committed Apr 5, 2024
1 parent a056e9d commit 90061fe
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/generate_dump
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,27 @@ collect_cisco_8000() {
echo "'/usr/share/sonic/device/${platform}' does not exist" > /tmp/error
save_file /tmp/error sai false
fi

save_cmd "show platform versions" "platform.versions"

# run 'hw-management-generate-dump.sh' script and save the result file
HW_DUMP_FILE=/usr/bin/hw-management-generate-dump.sh
if [[ -x $HW_DUMP_FILE ]]; then
${CMD_PREFIX} $HW_DUMP_FILE $ALLOW_PROCESS_STOP
ret=$?
if [[ $ret -ne 0 ]]; then
if [[ $ret -eq $TIMEOUT_EXIT_CODE ]]; then
echo "hw-management dump timedout after ${TIMEOUT_MIN} minutes."
else
echo "hw-management dump failed ..."
fi
else
save_file "/tmp/hw-mgmt-dump*" "hw-mgmt" false
rm -f /tmp/hw-mgmt-dump*
fi
else
echo "HW Mgmt dump script $HW_DUMP_FILE does not exist"
fi
}

##############################################################################
Expand Down

0 comments on commit 90061fe

Please sign in to comment.