diff --git a/files/image_config/warmboot-finalizer/finalize-warmboot.sh b/files/image_config/warmboot-finalizer/finalize-warmboot.sh index 2cde4028396b..094fff2133f7 100755 --- a/files/image_config/warmboot-finalizer/finalize-warmboot.sh +++ b/files/image_config/warmboot-finalizer/finalize-warmboot.sh @@ -76,6 +76,20 @@ function stop_control_plane_assistant() fi } +function restore_counters_folder() +{ + debug "Restoring counters folder after warmboot..." + + modules=("portstat-0" "dropstat" "pfcstat-0" "queuestat-0" "intfstat-0") + for module in ${modules[@]} + do + statfile="/host/counters/$module" + if [[ -d $statfile ]]; then + mv $statfile /tmp/ + fi + done +} + wait_for_database_service @@ -86,6 +100,8 @@ if [[ x"${WARM_BOOT}" != x"true" ]]; then exit 0 fi +restore_counters_folder + list=${COMP_LIST} # Wait up to 5 minutes