Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202012] [generate_dump]: Enhance show techsupport for cisco-8000 pla… #2395

Merged
merged 1 commit into from
Sep 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions scripts/generate_dump
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,32 @@ collect_broadcom() {
copy_from_masic_docker "syncd" "/var/log/bcm_diag_post" "/var/log/bcm_diag_post"
}

###############################################################################
# Collect Cisco-8000 specific information
# Globals:
# None
# Arguments:
# None
# Returns:
# None
###############################################################################
collect_cisco_8000() {
trap 'handle_error $? $LINENO' ERR
local platform=$(show platform summary --json | python -c 'import sys, json; \
print(json.load(sys.stdin)["platform"])')

if [ -d /usr/share/sonic/device/${platform} ]; then
pushd /usr/share/sonic/device/${platform} > /dev/null
for file in $(find . -path "./*plugin*" -prune -o -path "./*.xml" -prune -o -path "./*.yaml" -prune -o -print); do
save_file ${file} sai false
done
popd > /dev/null
else
echo "'/usr/share/sonic/device/${platform}' does not exist" > /tmp/error
save_file /tmp/error sai false
fi
}

###############################################################################
# Save log file
# Globals:
Expand Down Expand Up @@ -1235,6 +1261,10 @@ main() {
collect_broadcom
fi

if [ "$asic" = "cisco-8000" ]; then
collect_cisco_8000
fi

# 2nd counter snapshot late. Need 2 snapshots to make sense of counters trend.
save_counter_snapshot $asic 2

Expand Down