mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Code cleanup: removed code used very seldom such as host aggregations/contacts. This should reduce memory usage and make ntopng faster
Little progresses towards MySQL support
This commit is contained in:
parent
c85468df55
commit
6aa141caa9
59 changed files with 253 additions and 4282 deletions
|
|
@ -27,13 +27,11 @@ function dumpInterfaceStats(interface_name)
|
|||
-- Round up
|
||||
hosts_pctg = math.floor(1+((ifstats.stats_hosts*100)/prefs.max_num_hosts))
|
||||
flows_pctg = math.floor(1+((ifstats.stats_flows*100)/prefs.max_num_flows))
|
||||
aggregations_pctg = math.floor(1+((ifstats.stats_aggregations*100)/prefs.max_num_hosts))
|
||||
|
||||
print('\t{ "ifname": "'.. interface_name..'", "packets": '.. ifstats.stats_packets .. ', "bytes": ' .. ifstats.stats_bytes .. ', "drops": ' .. ifstats.stats_drops .. ', "alerts": '.. ntop.getNumQueuedAlerts() ..', "num_flows": '.. ifstats.stats_flows .. ', "num_hosts": ' .. ifstats.stats_hosts .. ', "num_aggregations": ' .. ifstats.stats_aggregations .. ', "epoch": ' .. os.time()..' , "uptime": " ' .. secondsToTime(uptime) .. '", "hosts_pctg": ' .. hosts_pctg .. ', "aggregations_pctg": ' .. aggregations_pctg .. ', "flows_pctg": ' .. flows_pctg)
|
||||
print('\t{ "ifname": "'.. interface_name..'", "packets": '.. ifstats.stats_packets .. ', "bytes": ' .. ifstats.stats_bytes .. ', "drops": ' .. ifstats.stats_drops .. ', "alerts": '.. ntop.getNumQueuedAlerts() ..', "num_flows": '.. ifstats.stats_flows .. ', "num_hosts": ' .. ifstats.stats_hosts .. ', "epoch": ' .. os.time()..' , "uptime": " ' .. secondsToTime(uptime) .. '", "hosts_pctg": ' .. hosts_pctg .. ', "flows_pctg": ' .. flows_pctg)
|
||||
|
||||
print(', "local2remote": '.. ifstats["localstats"]["bytes"]["local2remote"]..', "remote2local": '..ifstats["localstats"]["bytes"]["remote2local"])
|
||||
|
||||
|
||||
if(ifstats["bridge.device_a"] ~= nil) then
|
||||
print(', "a_to_b_in_pkts": '.. ifstats["bridge.a_to_b.in_pkts"])
|
||||
print(', "a_to_b_out_pkts": '.. ifstats["bridge.a_to_b.out_pkts"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue