Skip to content

Commit ff1faa4

Browse files
justin-oliverqiluo-msft
authored andcommitted
[generate_dump]: Enhance the generate_dump debugging script (#272)
* Improve generate_dump script Add additional debugging information to the generate_dump script including -usb and pci devices -transceiver status and eeprom data -interface status and counters -asic data -Arista specific info * Improve generate_dump script Add additional debugging information to the generate_dump script including -usb and pci devices -transceiver status and eeprom data -interface status and counters -asic data -Arista specific info
1 parent 3ae2cdf commit ff1faa4

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

scripts/generate_dump

+28-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ LN=ln
1313
GZIP=gzip
1414
CP=cp
1515
MV=mv
16+
GREP=grep
1617
V=
1718
NOOP=false
1819
DO_COMPRESS=true
@@ -255,8 +256,12 @@ main() {
255256
save_cmd "show version" "version"
256257
save_cmd "show platform summary" "platform.summary"
257258
save_cmd "show platform syseeprom" "platform.syseeprom"
259+
save_cmd "cat /host/machine.conf" "machine.conf"
258260

259261
save_cmd "sensors" "sensors"
262+
save_cmd "show platform psustatus" "platform.psustatus"
263+
save_cmd "lspci -vvv -xx" "lspci"
264+
save_cmd "lsusb -v" "lsusb"
260265

261266
save_cmd "sysctl -a" "sysctl"
262267
save_ip "link" "link"
@@ -270,6 +275,11 @@ main() {
270275
save_vtysh "show ip bgp" "bgp.table" true
271276
save_bgp_neighbor
272277

278+
save_cmd "show interface status" "interface.status"
279+
save_cmd "show interface counters" "interface.counters"
280+
save_cmd "show interface transceiver presence" "interface.xcvrs.presence"
281+
save_cmd "show interface transceiver eeprom --dom" "interface.xcvrs.eeprom"
282+
273283
save_cmd "lldpctl" "lldpctl"
274284

275285
save_cmd "ps aux" "ps.aux"
@@ -279,13 +289,17 @@ main() {
279289
save_cmd "vmstat -s" "vmstat.s"
280290
save_cmd "mount" "mount"
281291
save_cmd "df" "df"
292+
save_cmd "dmesg" "dmesg"
282293

283294
save_redis "0" "APP_DB"
284295
save_redis "1" "ASIC_DB"
285296
save_redis "2" "COUNTERS_DB"
286297

298+
save_cmd "docker ps -a" "docker.ps"
299+
save_cmd "docker top pmon" "docker.pmon"
300+
287301
save_cmd "docker exec -it syncd saidump" "saidump"
288-
302+
289303
local platform="$(/usr/local/bin/sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)"
290304
if [[ $platform == *"mlnx"* ]]; then
291305
local sai_dump_filename="/tmp/sai_sdk_dump_$(date +"%m_%d_%Y_%I_%M_%p")"
@@ -294,6 +308,19 @@ main() {
294308
save_file $sai_dump_filename sai_sdk_dump true
295309
fi
296310

311+
local asic="$(/usr/local/bin/sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type)"
312+
if [ "$asic" = "broadcom" ]; then
313+
save_cmd "bcmcmd -t5 version" "broadcom.version"
314+
save_cmd "bcmcmd -t5 soc" "broadcom.soc"
315+
save_cmd "bcmcmd -t5 ps" "broadcom.ps"
316+
fi
317+
318+
if $GREP -qi "aboot_platform=.*arista" /host/machine.conf; then
319+
save_cmd "cat /proc/scd" "scd"
320+
save_cmd "arista syseeprom" "arista.syseeprom"
321+
save_cmd "arista dump" "arista.dump"
322+
fi
323+
297324
$RM $V -rf $TARDIR
298325
$MKDIR $V -p $TARDIR
299326
$MKDIR $V -p $LOGDIR

0 commit comments

Comments
 (0)