tools: Visualize per-face link-layer byte counts in nfd-status
refs #1768
Change-Id: Ic70567501903f6d386a9dc5fdc81e70eeb8c5fd7
diff --git a/tools/nfd-status.cpp b/tools/nfd-status.cpp
index affd2d8..3262a28 100644
--- a/tools/nfd-status.cpp
+++ b/tools/nfd-status.cpp
@@ -401,6 +401,13 @@
std::cout << "</outgoingPackets>";
std::cout << "</packetCounters>";
+ std::cout << "<byteCounters>";
+ std::cout << "<incomingBytes>" << faceStatus.getNInBytes()
+ << "</incomingBytes>";
+ std::cout << "<outgoingBytes>" << faceStatus.getNOutBytes()
+ << "</outgoingBytes>";
+ std::cout << "</byteCounters>";
+
if (faceStatus.getFlags() != 0) {
std::cout << "<flags>";
if (faceStatus.isLocal()) {
@@ -444,9 +451,11 @@
}
std::cout << " counters={"
<< "in={" << faceStatus.getNInInterests() << "i "
- << faceStatus.getNInDatas() << "d}"
+ << faceStatus.getNInDatas() << "d "
+ << faceStatus.getNInBytes() << "B}"
<< " out={" << faceStatus.getNOutInterests() << "i "
- << faceStatus.getNOutDatas() << "d}"
+ << faceStatus.getNOutDatas() << "d "
+ << faceStatus.getNOutBytes() << "B}"
<< "}";
if (faceStatus.isLocal())
std::cout << " local";