diff --git a/scripts/generate_dump b/scripts/generate_dump index e2f0c45b395c..63cf6e52cfac 100755 --- a/scripts/generate_dump +++ b/scripts/generate_dump @@ -685,11 +685,11 @@ save_redis() { save_saidump() { trap 'handle_error $? $LINENO' ERR if [[ ( "$NUM_ASICS" == 1 ) ]] ; then - save_cmd "docker exec -t syncd saidump" "saidump" + save_cmd "docker exec syncd saidump" "saidump" else for (( i=0; i<$NUM_ASICS; i++ )) do - save_cmd "docker exec -t syncd$i saidump" "saidump$i" + save_cmd "docker exec syncd$i saidump" "saidump$i" done fi } @@ -830,8 +830,8 @@ collect_mellanox() { local sai_dump_folder="/tmp/saisdkdump" local sai_dump_filename="${sai_dump_folder}/sai_sdk_dump_$(date +"%m_%d_%Y_%I_%M_%p")" - ${CMD_PREFIX}docker exec -t syncd mkdir -p $sai_dump_folder - ${CMD_PREFIX}docker exec -t syncd saisdkdump -f $sai_dump_filename + ${CMD_PREFIX}docker exec syncd mkdir -p $sai_dump_folder + ${CMD_PREFIX}docker exec syncd saisdkdump -f $sai_dump_filename copy_from_docker syncd $sai_dump_folder $sai_dump_folder echo "$sai_dump_folder" @@ -840,7 +840,7 @@ collect_mellanox() { done ${CMD_PREFIX}rm -rf $sai_dump_folder - ${CMD_PREFIX}docker exec -t syncd rm -rf $sai_dump_folder + ${CMD_PREFIX}docker exec syncd rm -rf $sai_dump_folder # Save SDK error dumps local sdk_dump_path=`${CMD_PREFIX}docker exec syncd cat /tmp/sai.profile|grep "SAI_DUMP_STORE_PATH"|cut -d = -f2` @@ -1217,12 +1217,12 @@ main() { if [[ ( "$NUM_ASICS" > 1 ) ]]; then for (( i=0; i<$NUM_ASICS; i++ )) do - save_cmd "docker exec -t lldp$i lldpcli show statistics" "lldp$i.statistics" + save_cmd "docker exec lldp$i lldpcli show statistics" "lldp$i.statistics" save_cmd "docker logs bgp$i" "docker.bgp$i.log" save_cmd "docker logs swss$i" "docker.swss$i.log" done else - save_cmd "docker exec -t lldp lldpcli show statistics" "lldp.statistics" + save_cmd "docker exec lldp lldpcli show statistics" "lldp.statistics" save_cmd "docker logs bgp" "docker.bgp.log" save_cmd "docker logs swss" "docker.swss.log" fi @@ -1339,7 +1339,11 @@ main() { fi echo ${TARFILE} - exit $RETURN_CODE + + if ! $SAVE_STDERR + then + exit $RETURN_CODE + fi } ###############################################################################