mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Add safety check reading per interface storage utilization
This commit is contained in:
parent
9a8d3c521a
commit
8a1cc0e398
1 changed files with 6 additions and 4 deletions
|
|
@ -98,10 +98,12 @@ function storage_utils.storageInfo(refresh_cache, timeout)
|
|||
for id, name in pairs(ifnames) do
|
||||
local ifid = tonumber(id)
|
||||
local if_info = storage_utils.interfaceStorageInfo(ifid, separate_pcap_volume, refresh_cache, timeout)
|
||||
info.interfaces[ifid] = if_info
|
||||
info.total = info.total + if_info.total
|
||||
if if_info.pcap ~= nil then
|
||||
info.pcap_total = info.pcap_total + if_info.pcap
|
||||
if if_info then
|
||||
info.interfaces[ifid] = if_info
|
||||
info.total = info.total + if_info.total
|
||||
if if_info.pcap ~= nil then
|
||||
info.pcap_total = info.pcap_total + if_info.pcap
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue