diff --git a/syncd/syncd_counters.cpp b/syncd/syncd_counters.cpp index a315e27d1e..3e93a18173 100644 --- a/syncd/syncd_counters.cpp +++ b/syncd/syncd_counters.cpp @@ -1,5 +1,6 @@ #include "syncd.h" #include +#include void collectCounters(swss::Table &countersTable, const std::vector &supportedCounters) @@ -36,6 +37,11 @@ void collectCounters(swss::Table &countersTable, std::string strPortId; sai_serialize_primitive(vid, strPortId); + // for counters, use port vid as printf "%llx" format + std::stringstream ss; + ss << std::hex << vid; + strPortId = ss.str(); + std::vector values; for (size_t idx = 0; idx < counters.size(); idx++)