We're Hiring!

Server load statistics

General user discussion about using the OMERO platform to its fullest. Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

There are workflow guides for various OMERO functions on our help site - http://help.openmicroscopy.org

You should find answers to any basic questions about using the clients there.

Server load statistics

Postby robert.stanislawiak » Fri Jan 10, 2014 10:17 pm

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
robert.stanislawiak
 
Posts: 18
Joined: Mon Dec 16, 2013 2:21 pm
Location: Poland

Re: Server load statistics

Postby atarkowska » Mon Jan 13, 2014 11:21 am

Hi Robert,

Unfortunately we do not provide such a statistics in OMERO webadmin. Although you can write small script doing that for you like:

Code: Select all
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()


I hope that will help

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm


Return to User Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest