Skip to content

Commit

Permalink
Fix flex counters logic of converting poll interval to seconds from MS (
Browse files Browse the repository at this point in the history
sonic-net#878)

According to https://github.com/Azure/SONiC/blob/ec6d35dd2c28491bfade19cfee990fe612f1e5e9/doc/rates-and-utilization/Rates_and_utilization_HLD.md, counterpoll command gives polling interval in milliseconds. 
So when converting them to seconds to be supplied to lua script this should be divide by 1000. However, syncd multiplies it by 1000.

Changed the multiplication to none, and did the converting in lua script - sonic-net/sonic-swss#1855
Fixed issue - sonic-net#8392
  • Loading branch information
noaOrMlnx authored Sep 2, 2021
1 parent f2075ff commit 536af40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion syncd/FlexCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ void FlexCounter::runPlugins(
{
std::to_string(counters_db.getDbId()),
COUNTERS_TABLE,
std::to_string(m_pollInterval * 1000)
std::to_string(m_pollInterval)
};

std::vector<std::string> portList;
Expand Down

0 comments on commit 536af40

Please sign in to comment.