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

@ -4,6 +4,7 @@
local ts_utils = require("ts_utils_core")
local user_scripts = require("user_scripts")
local system_utils = require("system_utils")
local script = {
-- Script category
@ -28,7 +29,7 @@ local script = {
function script.hooks.min(params)
if params.ts_enabled then
local system_host_stats = ntop.systemHostStat()
local system_host_stats = system_utils.systemHostStats()
if((system_host_stats.mem_ntopng_resident ~= nil) and
(system_host_stats.mem_ntopng_virtual ~= nil)) then