Refactors system stats in a module system_utils.lua

This commit is contained in:
Simone Mainardi 2020-02-27 12:24:23 +01:00
parent b194643a18
commit ef06f9e1d3
5 changed files with 35 additions and 4 deletions

View file

@ -0,0 +1,27 @@
--
-- (C) 2014-20 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
local json = require("dkjson")
local system_utils = {}
-- #################################
function system_utils.systemHostStats()
local system_host_stats = ntop.systemHostStat()
-- TODO: add CPU states stats generated by cpu_states_monitor.lua
return system_host_stats
end
-- #################################
return system_utils