a993fc205f
- Why I did it Added platform specific script to be invoked during SAI failure dump. Added some generic changes to mount /var/log/sai_failure_dump as read write in the syncd docker - How I did it Added script in docker-syncd of mellanox and copied it to /usr/bin - How to verify it Manual UT and new sonic-mgmt tests
23 lines
621 B
Bash
Executable File
23 lines
621 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Script for sai failure dump
|
|
#
|
|
|
|
# Source the platform specific dump file
|
|
|
|
sai_dump_name="sai_sdk_dump_$(date +"%m_%d_%Y_%I_%M_%p")"
|
|
sai_dump_path="${DUMPDIR}/$sai_dump_name"
|
|
mkdir -p $sai_dump_path
|
|
sai_dump_file="${sai_dump_path}/$sai_dump_name"
|
|
saisdkdump -f $sai_dump_file
|
|
cd "${DUMPDIR}"
|
|
tar -cvf "$sai_dump_name".tar $sai_dump_name
|
|
gzip "$sai_dump_name".tar
|
|
rm -rf $sai_dump_name
|
|
|
|
# Update max failure dumps
|
|
if grep -q SAI_DUMP_STORE_AMOUNT /usr/share/sonic/hwsku/sai.profile; then
|
|
SAI_MAX_FAILURE_DUMPS=$(grep SAI_DUMP_STORE_AMOUNT /usr/share/sonic/hwsku/sai.profile | cut -d '=' -f2)
|
|
fi
|
|
|