-- -- (C) 2013-17 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path -- io.write ("Session:".._SESSION["session"].."\n") require "lua_utils" sendHTTPHeader('text/html; charset=iso-8859-1') ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc") local prefs = ntop.getPrefs() local dbname = (prefs.mysql_dbname or '') -- read the db activities to notify the user about what is going on in the database local res = interface.execSQLQuery("show full processlist", false, false) print [[
]] addLogoSvg() print[[
]] print[[ Waiting for database ]] print(dbname) print[[ to become operational. You will be redirected as soon as the database is ready.

Operations currently performed on the database are the following:

]] if res == nil then res = {} end if #res >= 1 then print[[ ]] for i,p in ipairs(res) do print('') print('') print('') print('') print('') local msg = "" for k, v in pairs(p) do msg = msg..k..": "..v.." " end end print[[
DatabaseStateCommandIdUserTimeInfoHost
'..(p["db"] or '')..''..(p["State"] or '')..''..(p["Command"] or '')..''..(p["Id"] or '')..''..(p["User"] or '')..''..secondsToTime(tonumber((p["Time"] or '')))..''..shortenString((p["Info"] or ''))..''..(p["Host"] or '')..'
]] end print[[
]]