mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Storage status in the interface page (rrd, flows index, pcap)
recording_utils.storageInfo now returns everything in bytes Added getFolderSize to lua utils Added rrd_utils.storageInfo
This commit is contained in:
parent
9e12db7cda
commit
931070804c
7 changed files with 112 additions and 27 deletions
|
|
@ -486,18 +486,18 @@ end
|
|||
-- ################################################################
|
||||
|
||||
function delete_data_utils.delete_old_nindex_flows()
|
||||
local retention = tonumber(ntop.getPref("ntopng.prefs.nindex_retention_days")) or 365
|
||||
local if_list = list_all_interfaces()
|
||||
if ntop.isEnterprise() and hasNindexSupport() then
|
||||
local nindex_utils = require "nindex_utils"
|
||||
|
||||
for ifid in pairs(if_list) do
|
||||
local data_dir = ntop.getDirs()["workingdir"]
|
||||
local ifdir = os_utils.fixPath(string.format("%s/%u/", data_dir, ifid))
|
||||
local flows_dir = os_utils.fixPath(ifdir .. "/flows")
|
||||
local aggrflows_dir = os_utils.fixPath(ifdir .. "/aggregatedflows")
|
||||
local now = os.time()
|
||||
local retention = tonumber(ntop.getPref("ntopng.prefs.nindex_retention_days")) or 365
|
||||
local if_list = list_all_interfaces()
|
||||
|
||||
harvestDateBasedDirTree(flows_dir, retention, now)
|
||||
harvestDateBasedDirTree(aggrflows_dir, retention, now)
|
||||
for ifid in pairs(if_list) do
|
||||
local now = os.time()
|
||||
local flows_dirs = nindex_utils.getDirs(ifid)
|
||||
harvestDateBasedDirTree(flows_dirs.flows, retention, now)
|
||||
harvestDateBasedDirTree(flows_dirs.aggregatedflows, retention, now)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue