read the bandwidth @5s interval against 1s to go easy on the system

parent d58fa9ad
...@@ -121,7 +121,7 @@ def monitor_devs_ifstat(fname="rate.csv"): ...@@ -121,7 +121,7 @@ def monitor_devs_ifstat(fname="rate.csv"):
def monitor_devs_ng(fname="txrate.csv" , interval_sec=0.01): def monitor_devs_ng(fname="txrate.csv" , interval_sec=0.01):
"""Uses bwm-ng tool to collect iface tx rate stats. Very reliable.""" """Uses bwm-ng tool to collect iface tx rate stats. Very reliable."""
cmd = ("sleep 1; bwm-ng -t %s -o csv " cmd = ("sleep 5; bwm-ng -t %s -o csv "
"-u bytes -T rate -C ',' > %s" % "-u bytes -T rate -C ',' > %s" %
(interval_sec * 1000, fname)) (interval_sec * 1000, fname))
Popen(cmd, shell=True).wait() Popen(cmd, shell=True).wait()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment