使用RYU控制器,如何使用例如simple_monitor应用程序将所有统计数据(在整个监控时间内)作为时间序列统计数据导出到csv文件中?
发布于 2021-05-01 20:07:02
通过在_port_stats_reply_handler函数中创建一个新文件,我设法导出了统计数据:
file = open('stats.csv', 'a')然后在循环中我添加了:
for stat in sorted(body, key=attrgetter('port_no')):
file.write("\n{},{},{},{},{},{}"
.format(ev.msg.datapath.id,
stat.port_no, stat.rx_packets, stat.rx_dropped,
stat.tx_packets, stat.tx_dropped))https://stackoverflow.com/questions/67288992
复制相似问题