Hi all, I am currently trying to get any statistics of running switch. and I am re-writing some networkstate/linkload.cc as blow, but I think their value is "0" I need your help and any suggestion would help me. Thanks, void linkload::send_stat_req(const datapathid& dpid, uint16_t port) { size_t size = sizeof(ofp_stats_request)+sizeof(ofp_port_stats_request); of_raw.reset(new uint8_t[size]); of_stats_request osr(openflow_pack::header(OFPT_STATS_REQUEST, size), OFPST_PORT, 0); of_port_stats_request opsr; opsr.port_no = OFPP_NONE; osr.pack((ofp_stats_request*) openflow_pack::get_pointer(of_raw)); opsr.pack((ofp_port_stats_request*) openflow_pack::get_pointer(of_raw, sizeof(ofp_stats_request))); /*send request message*/ send_openflow_command(dpi->second.datapath_id, of_raw, false);
of_port_stats psrep; std::cout<<"RX_packets = "<<psrep.rx_packets<<std::endl; std::cout<<"RX_bytes = "<<psrep.rx_bytes<<std::endl; std::cout<<"TX_bytes = "<<psrep.tx_bytes<<std::endl; ./nox_core -i ptcp:6633 -v simplerouting linkload=interval=10 .... .... 00096|linkload|DBG:Send probe to 123456abcdef RX_packets = 0 RX_bytes = 0 TX_bytes = 0 |
Best Regards,
Min-Hyup KANG
_______________________________________________ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev