mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Greatly reduces the number of open files in second.lua
This commit is contained in:
parent
83a58ad016
commit
46439a8c02
5 changed files with 49 additions and 31 deletions
|
|
@ -382,13 +382,13 @@ end
|
|||
function rrd_utils.makeRRD(basedir, when, if_id, key, rrdname, step, value)
|
||||
local name = os_utils.fixPath(basedir .. "/" .. rrdname .. ".rrd")
|
||||
|
||||
if(string.contains(rrdname, "num_")) then
|
||||
if rrdname:find("^num_") then
|
||||
create_rrd_num(name, rrdname, step)
|
||||
else
|
||||
create_rrd(name, step, rrdname)
|
||||
end
|
||||
|
||||
ntop.rrd_update(name, nil, tolongint(value))
|
||||
ntop.rrd_update(name, nil, string.format("%u", value or 0))
|
||||
|
||||
local tskey = if_id
|
||||
if(key ~= nil) then tskey = tskey ..":"..key end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue