Implements per-interface updateStats variable frequency

This commit is contained in:
Simone Mainardi 2019-09-04 19:27:55 +02:00
parent 4ea64d4275
commit ca56f94cef
6 changed files with 53 additions and 3 deletions

View file

@ -65,6 +65,7 @@ function dumpInterfaceStats(ifid)
res["ifid"] = ifid
res["ifname"] = interface_name
res["speed"] = getInterfaceSpeed(ifstats.id)
res["periodic_stats_update_frequency_secs"] = ifstats.periodic_stats_update_frequency_secs
-- network load is used by web pages that are shown to the user
-- so we must return statistics since the latest (possible) reset
res["packets"] = ifstats.stats_since_reset.packets