sonic-buildimage/platform/broadcom/sonic-platform-modules-dell/common/actions.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

22 lines
400 B
Bash
Executable File

#!/bin/bash
platform="$(sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)"
TMP_DIR="/tmp/hw-mgmt-dump"
rm -rf $TMP_DIR
mkdir $TMP_DIR
save_cmd(){
TOUT=$1
CMD=$2
CMD_NAME=$3
echo "##### $CMD_NAME #####">> $TMP_DIR/hw-mgmt-dump.txt
eval timeout $TOUT $CMD >> $TMP_DIR/hw-mgmt-dump.txt
}
tar_file(){
tar czf /tmp/hw-mgmt-dump.tar.gz -C $TMP_DIR .
rm -rf $TMP_DIR
}