diff --git a/scripts/generate_dump b/scripts/generate_dump index 486b902b2f..3748a0b3b9 100755 --- a/scripts/generate_dump +++ b/scripts/generate_dump @@ -1266,7 +1266,11 @@ collect_mellanox_dfw_dumps() { trap 'handle_error $? $LINENO' ERR local platform=$(python3 -c "from sonic_py_common import device_info; print(device_info.get_platform())") local hwsku=$(python3 -c "from sonic_py_common import device_info; print(device_info.get_hwsku())") - local sdk_dump_path=`cat /usr/share/sonic/device/${platform}/${hwsku}/sai.profile|grep "SAI_DUMP_STORE_PATH"|cut -d = -f2` + + if [[ "$(docker container inspect -f '{{.State.Running}}' syncd)" == "true" ]]; then + local sdk_dump_cmd="cat /etc/mlnx/sai-common.profile | grep SAI_DUMP_STORE_PATH | cut -d= -f2" + local sdk_dump_path="$(eval docker exec syncd ${sdk_dump_cmd})" + fi if [[ ! -d $sdk_dump_path ]]; then # This would mean the SAI_DUMP_STORE_PATH is not mounted on the host and is only accessible though the container