diff --git a/files/scripts/swss.sh b/files/scripts/swss.sh index 5f4376e7ced..70ceb40521e 100755 --- a/files/scripts/swss.sh +++ b/files/scripts/swss.sh @@ -14,7 +14,9 @@ TSA_TSB_SERVICE="startup_tsa_tsb.service" function debug() { - /usr/bin/logger $1 + # Use --id=$$ so all messages from this script share the parent shell's PID, + # preventing rsyslog imuxsock ratelimiter memory growth. + /usr/bin/logger --id=$$ -- "$1" /bin/echo `date` "- $1" >> ${DEBUGLOG} } diff --git a/files/scripts/syncd_common.sh b/files/scripts/syncd_common.sh index d3a8b0df7c4..9d62ea03b8e 100755 --- a/files/scripts/syncd_common.sh +++ b/files/scripts/syncd_common.sh @@ -15,7 +15,9 @@ function debug() { - /usr/bin/logger $1 + # Use --id=$$ so all messages from this script share the parent shell's PID, + # preventing rsyslog imuxsock ratelimiter memory growth. + /usr/bin/logger --id=$$ -- "$1" /bin/echo `date` "- $1" >> ${DEBUGLOG} } diff --git a/platform/mellanox/docker-syncd-mlnx/phcsync.sh b/platform/mellanox/docker-syncd-mlnx/phcsync.sh index 910399b0218..2923e4e5371 100755 --- a/platform/mellanox/docker-syncd-mlnx/phcsync.sh +++ b/platform/mellanox/docker-syncd-mlnx/phcsync.sh @@ -82,7 +82,8 @@ while :; do if [[ "$clock_name" != "mlx5_ptp" ]]; then # set CLOCK_REALTIME - "$PHC_CTL" "$dev" set 2>/dev/null + # Keep successful syncs silent to avoid rsyslogd ratelimit memory issue due to PID churn. + "$PHC_CTL" -q -Q "$dev" set >/dev/null PHC_CTL_EXIT_CODE=$? if [[ $PHC_CTL_EXIT_CODE -ne 0 ]]; then echo "Error: Failed to sync clock for $dev (phc_ctl exit code: $PHC_CTL_EXIT_CODE)" >&2