Skip to content

Commit 0ff9400

Browse files
authored
Broadcom show techsupport comamnds update (#347)
Update Broadcom show techsupport commands for TH5 chipset. <!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md ** Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "closes #xxxx", "fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related issue when the PR is merged. If you are adding/modifying/removing any command or utility script, please also make sure to add/modify/remove any unit tests from the tests directory as appropriate. If you are modifying or removing an existing 'show', 'config' or 'sonic-clear' subcommand, or you are adding a new subcommand, please make sure you also update the Command Line Reference Guide (doc/Command-Reference.md) to reflect your changes. Please provide the following information: --> #### What I did Update Broadcom commands in collect_broadcom method. #### How I did it Run Broadcom commands based on the chipset type. #### How to verify it Run show techsupport on TH5 DUT and non-TH5 DUT. Verify the commands output in the dump package has no errors. Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com> #### Previous command output (if the output of a command-line utility has changed) #### New command output (if the output of a command-line utility has changed)
1 parent 76e88eb commit 0ff9400

1 file changed

Lines changed: 33 additions & 13 deletions

File tree

scripts/generate_dump

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,7 @@ collect_broadcom() {
14741474
print(json.load(sys.stdin)["platform"])')
14751475
local hwsku=$(show platform summary --json | python -c 'import sys, json; \
14761476
print(json.load(sys.stdin)["hwsku"])')
1477+
local hsdk=$(bcmcmd bsh -c SOC | grep 'Failed to execute')
14771478

14781479
# save SAI configuration files (config.bcm, port_config.ini, sai.profile)
14791480
if [ -d /usr/share/sonic/device/${platform}/${hwsku} ]; then
@@ -1516,9 +1517,14 @@ collect_broadcom() {
15161517
save_cmd "cat /proc/bcm/knet/link" "broadcom.knet.link"
15171518
save_cmd "cat /proc/bcm/knet/rate" "broadcom.knet.rate"
15181519

1519-
save_bcmcmd_all_ns "-t5 version" "broadcom.version"
1520-
save_bcmcmd_all_ns "-t5 soc" "broadcom.soc"
1521-
save_bcmcmd_all_ns "-t5 ps" "broadcom.ps"
1520+
save_bcmcmd_all_ns "-t 5 version" "broadcom.version"
1521+
if [ -z "$hsdk" ]; then
1522+
save_bcmcmd_all_ns "-t 5 soc" "broadcom.soc"
1523+
else
1524+
save_bcmcmd_all_ns "-t 5 attach" "broadcom.attach"
1525+
save_bcmcmd_all_ns "-t 5 stkmode" "broadcom.stkmode"
1526+
fi
1527+
save_bcmcmd_all_ns "-t 5 ps" "broadcom.ps"
15221528
if [ -e /usr/share/sonic/device/${platform}/platform_asic ]; then
15231529
bcm_family=`cat /usr/share/sonic/device/${platform}/platform_asic`
15241530
else
@@ -1572,28 +1578,42 @@ collect_broadcom() {
15721578
save_bcmcmd_all_ns "\"fabric connectivity\"" "fabric.connect.summary"
15731579
save_bcmcmd_all_ns "\"port status\"" "port.status.summary"
15741580
else
1575-
save_bcmcmd_all_ns "\"l3 nat_ingress show\"" "broadcom.nat.ingress"
1576-
save_bcmcmd_all_ns "\"l3 nat_egress show\"" "broadcom.nat.egress"
1581+
if [ -n "$(bcmcmd 'show feature' | grep -i nat)" ]; then
1582+
save_bcmcmd_all_ns "\"l3 nat_ingress show\"" "broadcom.nat.ingress"
1583+
save_bcmcmd_all_ns "\"l3 nat_egress show\"" "broadcom.nat.egress"
1584+
fi
15771585
save_bcmcmd_all_ns "\"ipmc table show\"" "broadcom.ipmc"
15781586
save_bcmcmd_all_ns "\"multicast show\"" "broadcom.multicast"
1579-
save_bcmcmd_all_ns "\"conf show\"" "conf.summary"
15801587
save_bcmcmd_all_ns "\"fp show\"" "fp.summary"
15811588
save_bcmcmd_all_ns "\"pvlan show\"" "pvlan.summary"
15821589
save_bcmcmd_all_ns "\"l2 show\"" "l2.summary"
15831590
save_bcmcmd_all_ns "\"l3 intf show\"" "l3.intf.summary"
1584-
save_bcmcmd_all_ns "\"l3 defip show\"" "l3.defip.summary"
1585-
save_bcmcmd_all_ns "\"l3 l3table show\"" "l3.l3table.summary"
15861591
save_bcmcmd_all_ns "\"l3 egress show\"" "l3.egress.summary"
1587-
save_bcmcmd_all_ns "\"l3 ecmp egress show\"" "l3.ecmp.egress.summary"
1588-
save_bcmcmd_all_ns "\"l3 multipath show\"" "l3.multipath.summary"
1589-
save_bcmcmd_all_ns "\"l3 ip6host show\"" "l3.ip6host.summary"
1590-
save_bcmcmd_all_ns "\"l3 ip6route show\"" "l3.ip6route.summary"
15911592
save_bcmcmd_all_ns "\"mc show\"" "multicast.summary"
15921593
save_bcmcmd_all_ns "\"cstat *\"" "cstat.summary"
15931594
save_bcmcmd_all_ns "\"mirror show\"" "mirror.summary"
15941595
save_bcmcmd_all_ns "\"mirror dest show\"" "mirror.dest.summary"
15951596
save_bcmcmd_all_ns "\"port *\"" "port.summary"
1596-
save_bcmcmd_all_ns "\"d chg my_station_tcam\"" "mystation.tcam.summary"
1597+
if [ -z "$hsdk" ]; then
1598+
save_bcmcmd_all_ns "\"conf show\"" "conf.summary"
1599+
save_bcmcmd_all_ns "\"l3 defip show\"" "l3.defip.summary"
1600+
save_bcmcmd_all_ns "\"l3 l3table show\"" "l3.l3table.summary"
1601+
save_bcmcmd_all_ns "\"l3 ecmp egress show\"" "l3.ecmp.egress.summary"
1602+
save_bcmcmd_all_ns "\"l3 multipath show\"" "l3.multipath.summary"
1603+
save_bcmcmd_all_ns "\"l3 ip6host show\"" "l3.ip6host.summary"
1604+
save_bcmcmd_all_ns "\"l3 ip6route show\"" "l3.ip6route.summary"
1605+
save_bcmcmd_all_ns "\"d chg my_station_tcam\"" "mystation.tcam.summary"
1606+
else
1607+
# TH5 cmds
1608+
save_bcmcmd_all_ns "\"show config lt raw\"" "show.config.lt.raw"
1609+
save_bcmcmd_all_ns "\"l3 route show v6=0\"" "l3.ip4route.show"
1610+
save_bcmcmd_all_ns "\"l3 host show v6=0\"" "l3.ip4host.show"
1611+
save_bcmcmd_all_ns "\"l3 ecmp show\"" "l3.ecmp.show"
1612+
save_bcmcmd_all_ns "\"l3 host show v6=1\"" "l3.ip6host.show"
1613+
save_bcmcmd_all_ns "\"l3 route show v6=1\"" "l3.ip6route.show"
1614+
save_bcmcmd_all_ns "\"l2 station show\"" "l2.station.show"
1615+
save_bcmcmd_all_ns "\"bcmltshell -c 'pt dump -d my_station_tcam'\"" "mystation.tcam.summary"
1616+
fi
15971617
fi
15981618

15991619
copy_from_masic_docker "syncd" "/var/log/diagrun.log" "/var/log/diagrun.log"

0 commit comments

Comments
 (0)