-- -- (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 [[
| Database | State | Command | Id | User | Time | Info | Host |
|---|---|---|---|---|---|---|---|
| '..(p["db"] or '')..' | '..(p["State"] or '')..' | '..(p["Command"] or '')..' | '..(p["Id"] or '')..' | ') print(''..(p["User"] or '')..' | '..secondsToTime(tonumber((p["Time"] or '')))..' | ') print(''..shortenString((p["Info"] or ''))..' | '..(p["Host"] or '')..' | ') print('