From 241712124c6c4db76d203ec37298217e4bc464b3 Mon Sep 17 00:00:00 2001 From: Kamil Cudnik Date: Tue, 16 Aug 2016 16:12:49 -0700 Subject: [PATCH] Change vid db format for counters (#57) --- syncd/syncd_counters.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/syncd/syncd_counters.cpp b/syncd/syncd_counters.cpp index a315e27d1e45..3e93a1817326 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++)