sonic-buildimage/platform/broadcom/sonic-platform-modules-dell/s6000/scripts/hw-management-generate-dump.sh
Santhosh Kumar T f6fb72b7b6
[Dell] S6100 S6000 - Show techsupport enhancement (#6410)
- Why I did it

To collect platform based logs along with "show techsupport" on S6000 and S6100 plaforms.
- How I did it
On branch dell_techsupport_dump
Changes to be committed:
(use "git reset HEAD ..." to unstage)

    new file:   platform/broadcom/sonic-platform-modules-dell/common/actions.sh
    modified:   platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6000.install
    modified:   platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install
    new file:   platform/broadcom/sonic-platform-modules-dell/s6000/scripts/hw-management-generate-dump.sh
    new file:   platform/broadcom/sonic-platform-modules-dell/s6100/scripts/hw-management-generate-dump.sh
- How to verify it
hw-mgmt-dump.tar.gz will be found in sonic_dump__< YYYYMMDD_HHMMSS>.tar.gz.
2021-03-09 15:49:24 -08:00

39 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
platform="$(sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)"
source /usr/share/sonic/device/$platform/actions.sh
I2C_ADAPTER="/sys/class/i2c-adapter"
save_cmd "10" "hexdump -C /dev/nvram" "NVRAM dump"
save_cmd "10" "hexdump -C $I2C_ADAPTER/i2c-10/10-0053/eeprom" "System EEPROM"
save_cmd "10" "grep -H '' /sys/devices/platform/dell-s6000-cpld.0/*" "CPLD"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-11/11-0029/*" "FAN"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-11/11-0029/hwmon/hwmon*/*" "FAN"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-11/11-002a/*" "FAN"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-11/11-002a/hwmon/hwmon*/*" "FAN"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-11/11-0042/hwmon/hwmon*/*" "PSU"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-11/11-0040/hwmon/hwmon*/*" "PSU"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-11/11-004c/*" "TMP75"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-11/11-004c/hwmon/hwmon*/*" "TMP75"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-11/11-004d/*" "TMP75"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-11/11-004d/hwmon/hwmon*/*" "TMP75"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-11/11-004e/*" "TMP75"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-11/11-004e/hwmon/hwmon*/*" "TMP75"
INDEX=20
while [ $INDEX -lt 52 ]; do
save_cmd "10" "hexdump -C $I2C_ADAPTER/i2c-$INDEX/$INDEX-0050/eeprom" "SFP ports"
save_cmd "10" "grep -H '' $I2C_ADAPTER/i2c-$INDEX/$INDEX-0050/name $I2C_ADAPTER/i2c-$INDEX/$INDEX-0050/modalias" "SFP ports"
let INDEX=$INDEX+1
done
save_cmd "10" "smartctl -a /dev/sda" "SSD"
save_cmd "10" "sgdisk -p /dev/sda" "SSD Partitions"
save_cmd "10" "cat /host/reboot-cause/reboot-cause.txt" "Reboot Reason"
save_cmd "10" "show reboot-cause" "Reboot cause"
tar_file