mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Refactors system stats in a module system_utils.lua
This commit is contained in:
parent
b194643a18
commit
ef06f9e1d3
5 changed files with 35 additions and 4 deletions
27
scripts/lua/modules/system_utils.lua
Normal file
27
scripts/lua/modules/system_utils.lua
Normal 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue