Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[VOQ][saidump] Enhance saidump with new option -r to parser the JSON file and displays/format the right output, fix compiling error #1335

Open
wants to merge 7 commits into
base: 202305
Choose a base branch
from
Open
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ AC_OUTPUT(Makefile
unittest/lib/Makefile
unittest/vslib/Makefile
unittest/syncd/Makefile
unittest/saidump/Makefile
pyext/Makefile
pyext/py2/Makefile
pyext/py3/Makefile)
5 changes: 4 additions & 1 deletion saidump/Makefile.am
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ AM_CXXFLAGS = $(SAIINC) -I$(top_srcdir)/lib

bin_PROGRAMS = saidump

saidump_SOURCES = saidump.cpp
saidump_SOURCES = main.cpp saidump.cpp
saidump_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
saidump_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS)
saidump_LDADD = -lhiredis -lswsscommon -lpthread -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta \
-L$(top_srcdir)/lib/.libs -lsairedis -lzmq $(CODE_COVERAGE_LIBS)

noinst_LIBRARIES = libsaidump.a
libsaidump_a_SOURCES = saidump.cpp
19 changes: 19 additions & 0 deletions saidump/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "saidump.h"

using namespace syncd;

int main(int argc, char **argv)
{
SWSS_LOG_ENTER();
swss::Logger::getInstance().setMinPrio(swss::Logger::SWSS_INFO);

SaiDump m_saiDump;

if(SAI_STATUS_SUCCESS != m_saiDump.handleCmdLine(argc, argv))
{
return EXIT_FAILURE;
}

m_saiDump.dumpFromRedisDb();
return EXIT_SUCCESS;
}
Loading
Loading