Skip to content

Commit

Permalink
[showtech]: dump a few more DB in generate dump (sonic-net#795)
Browse files Browse the repository at this point in the history
dump a few more DB, config db, state db, flex counter db in generate dump.
also do not zip some bgp table since the whole tar file is gziped.
  • Loading branch information
lguohan authored Feb 3, 2020
1 parent 6b23f19 commit 89e6361
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/generate_dump
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,10 @@ main() {

save_vtysh "show ip bgp summary" "bgp.summary"
save_vtysh "show ip bgp neighbors" "bgp.neighbors"
save_vtysh "show ip bgp" "bgp.table" true
save_vtysh "show ip bgp" "bgp.table"
save_vtysh "show bgp ipv6 summary" "bgp.ipv6.summary"
save_vtysh "show bgp ipv6 neighbors" "bgp.ipv6.neighbors"
save_vtysh "show bgp ipv6" "bgp.ipv6.table" true
save_vtysh "show bgp ipv6" "bgp.ipv6.table"
save_bgp_neighbor

save_cmd "show interface status" "interface.status"
Expand All @@ -375,14 +375,17 @@ main() {
save_redis "0" "APP_DB"
save_redis "1" "ASIC_DB"
save_redis "2" "COUNTERS_DB"
save_redis "4" "CONFIG_DB"
save_redis "5" "FLEX_COUNTER_DB"
save_redis "6" "STATE_DB"

save_cmd "docker ps -a" "docker.ps"
save_cmd "docker top pmon" "docker.pmon"

save_cmd "docker exec -it syncd saidump" "saidump"

local platform="$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)"
if [[ $platform == *"mlnx"* ]]; then
local asic="$(/usr/local/bin/sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type)"
if [[ "$asic" = "mellanox" ]]; then
local sai_dump_filename="/tmp/sai_sdk_dump_$(date +"%m_%d_%Y_%I_%M_%p")"
${CMD_PREFIX}docker exec -it syncd saisdkdump -f $sai_dump_filename
${CMD_PREFIX}docker exec syncd tar Ccf $(dirname $sai_dump_filename) - $(basename $sai_dump_filename) | tar Cxf /tmp/ -
Expand All @@ -396,7 +399,6 @@ main() {
done
fi

local asic="$(/usr/local/bin/sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type)"
if [ "$asic" = "broadcom" ]; then
save_cmd "bcmcmd -t5 version" "broadcom.version"
save_cmd "bcmcmd -t5 soc" "broadcom.soc"
Expand Down

0 comments on commit 89e6361

Please sign in to comment.