forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mellanox][sai_failure_dump]Added platform specific script to be invo…
…ked during SAI failure dump (sonic-net#13533) - 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
- Loading branch information
1 parent
e6fde1d
commit 8c6ab89
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
platform/mellanox/docker-syncd-mlnx/platform_syncd_dump.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/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 | ||
|