hello, can I see somehow how my server's users usage looks like , how many logins and so on in some time period chart?
Regards
RS
import omero
import omero.gateway
from omero.rtypes import *
c=omero.client(OMERO_HOST, 4064)
sess=c.createSession(USERNAME,PASSWORD)
conn=omero.gateway.BlitzGateway(client_obj=c)
experimenters = list(conn.getObjects("Experimenter"))
p = omero.sys.Parameters()
p.map = {}
p.map['eids'] = rlist(rlong(e.id) for e in experimenters)
# filter agent
p.map['sysUserAgent'] = rlist([rstring('OMERO.web'), rstring('OMERO.insight')])
sql = "select o.id, COUNT(s.closed) as total, s.closed, s.started "\
"from Session s join s.owner o "\
"where o.id in (:eids) and s.userAgent in (:sysUserAgent) "\
"and s.started > '2014-01-01 00:00:00' "\
"group by o.id, s.closed, s.started"
res = conn.getQueryService().projection(sql, p, None)
rv = unwrap(res)
conn.c.closeSession()
Users browsing this forum: No registered users and 1 guest