Skip to content

Commit

Permalink
[crmorch] Prevent exceededLogCounter from resetting when low and high…
Browse files Browse the repository at this point in the history
… values are equal (sonic-net#2327)

* [crmorch] Prevent exceededLogCounter from resetting when low and high values are equal
  • Loading branch information
alexrallen authored Jun 14, 2022
1 parent bf4d890 commit 3c3bb17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orchagent/crmorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ void CrmOrch::checkCrmThresholds()

res.exceededLogCounter++;
}
else if ((utilization <= res.lowThreshold) && (res.exceededLogCounter > 0))
else if ((utilization <= res.lowThreshold) && (res.exceededLogCounter > 0) && (res.highThreshold != res.lowThreshold))
{
SWSS_LOG_WARN("%s THRESHOLD_CLEAR for %s %u%% Used count %u free count %u",
res.name.c_str(), threshType.c_str(), percentageUtil, cnt.usedCounter, cnt.availableCounter);
Expand Down

0 comments on commit 3c3bb17

Please sign in to comment.