Skip to content

Commit 45e7b71

Browse files
authored
[Mellanox] Add all results from saisdkdump to the techsupport on Mellanox switches (sonic-net#1660)
- What I did Enhance the way techsupport collects dumps provided by SAI and do not keep them in the filesystem once the techsupport is created. - How I did it Create a temporary directory once techsupport script is executed, gather all files SAI dumps created, add them to the tech support and remove the temporary directory and files. Remove direct call to FW trace collection as it is done now by SAI dump - How to verify it Run techsupport, verify newly created files are part of it including mlxtrace which is no longer called directly by the techsupport script.
1 parent a1c8751 commit 45e7b71

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

scripts/generate_dump

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -758,10 +758,20 @@ enable_logrotate() {
758758
# None
759759
###############################################################################
760760
collect_mellanox() {
761-
local sai_dump_filename="/tmp/sai_sdk_dump_$(date +"%m_%d_%Y_%I_%M_%p")"
761+
local sai_dump_folder="/tmp/saisdkdump"
762+
local sai_dump_filename="${sai_dump_folder}/sai_sdk_dump_$(date +"%m_%d_%Y_%I_%M_%p")"
763+
764+
${CMD_PREFIX}docker exec -it syncd mkdir -p $sai_dump_folder
762765
${CMD_PREFIX}docker exec -it syncd saisdkdump -f $sai_dump_filename
763-
${CMD_PREFIX}docker exec syncd tar Ccf $(dirname $sai_dump_filename) - $(basename $sai_dump_filename) | tar Cxf /tmp/ -
764-
save_file $sai_dump_filename sai_sdk_dump true
766+
767+
copy_from_docker syncd $sai_dump_folder $sai_dump_folder
768+
echo "$sai_dump_folder"
769+
for file in `ls $sai_dump_folder`; do
770+
save_file ${sai_dump_folder}/${file} sai_sdk_dump true
771+
done
772+
773+
${CMD_PREFIX}rm -rf $sai_dump_folder
774+
${CMD_PREFIX}docker exec -it syncd rm -rf $sai_dump_folder
765775

766776
local mst_dump_filename="/tmp/mstdump"
767777
local max_dump_count="3"

0 commit comments

Comments
 (0)