35 const function<
void()>& onSuccess,
36 const Controller::DatasetFailCallback& onFailure,
37 const CommandOptions& options)
39 controller.fetch<ndn::nfd::ForwarderGeneralStatusDataset>(
40 [
this, onSuccess] (
const ForwarderStatus& result) {
47 static time::system_clock::Duration
50 return status.getCurrentTimestamp() - status.getStartTimestamp();
62 os <<
"<generalStatus>";
64 os <<
"<version>" <<
xml::Text{item.getNfdVersion()} <<
"</version>";
69 os <<
"<nNameTreeEntries>" << item.getNNameTreeEntries() <<
"</nNameTreeEntries>";
70 os <<
"<nFibEntries>" << item.getNFibEntries() <<
"</nFibEntries>";
71 os <<
"<nPitEntries>" << item.getNPitEntries() <<
"</nPitEntries>";
72 os <<
"<nMeasurementsEntries>" << item.getNMeasurementsEntries() <<
"</nMeasurementsEntries>";
73 os <<
"<nCsEntries>" << item.getNCsEntries() <<
"</nCsEntries>";
75 os <<
"<packetCounters>";
76 os <<
"<incomingPackets>" 77 <<
"<nInterests>" << item.getNInInterests() <<
"</nInterests>" 78 <<
"<nData>" << item.getNInData() <<
"</nData>" 79 <<
"<nNacks>" << item.getNInNacks() <<
"</nNacks>" 80 <<
"</incomingPackets>";
81 os <<
"<outgoingPackets>" 82 <<
"<nInterests>" << item.getNOutInterests() <<
"</nInterests>" 83 <<
"<nData>" << item.getNOutData() <<
"</nData>" 84 <<
"<nNacks>" << item.getNOutNacks() <<
"</nNacks>" 85 <<
"</outgoingPackets>";
86 os <<
"</packetCounters>";
88 os <<
"</generalStatus>";
94 os <<
"General NFD status:\n";
101 os <<
" version=" << item.getNfdVersion() <<
"\n";
106 os <<
" nNameTreeEntries=" << item.getNNameTreeEntries() <<
"\n";
107 os <<
" nFibEntries=" << item.getNFibEntries() <<
"\n";
108 os <<
" nPitEntries=" << item.getNPitEntries() <<
"\n";
109 os <<
" nMeasurementsEntries=" << item.getNMeasurementsEntries() <<
"\n";
110 os <<
" nCsEntries=" << item.getNCsEntries() <<
"\n";
112 os <<
" nInInterests=" << item.getNInInterests() <<
"\n";
113 os <<
" nOutInterests=" << item.getNOutInterests() <<
"\n";
114 os <<
" nInData=" << item.getNInData() <<
"\n";
115 os <<
" nOutData=" << item.getNOutData() <<
"\n";
116 os <<
" nInNacks=" << item.getNInNacks() <<
"\n";
117 os <<
" nOutNacks=" << item.getNOutNacks() <<
"\n";
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
std::string formatTimestamp(time::system_clock::TimePoint t)
std::string formatDuration(DURATION d, bool isLong=false)