Hi Philippe,
phm wrote:And what about a command to know the connected users. It's will be very useful for shutdown the server or for maintenance. Or how to know if some people transfer images ?
I will usually grep the Blitz log, for `user=` lines, though Josh has recommended using HQL to query the event log, as follows (replacing the date/time with whatever time you're interested in):
- Code: Select all
/opt/omero/OMERO-CURRENT/bin/omero hql "select e.experimenter.omeName, count(e) from Event e where e.time > cast('2015-04-22 16:00', timestamp) group by e.experimenter.omeName" -q | egrep -v "root|sysadmin-userid|PUBLIC|guest"
Here's my Blitz log grep - but point to note, the above HQL seems to return the same users shown up in my Blitz log parse, and a few more. Since I'm not sure why that is, I usually run both.
Change the '[0-5]' to whatever minute range in the current hour you're interested in.
- Code: Select all
cat /opt/omero/OMERO-CURRENT/var/log/Blitz-0.log | grep "$(date +%Y-%m-%d' '%H:)[0-5]" | grep 'user=' | awk '{ print $8 }' | sort | cut -d',' -f1 | uniq | cut -d'=' -f2 | egrep -v '0' | xargs OMERO-CURRENT/bin/omero user info --user-id
And I'll do a `tail` of the web server log, too, to see if there are existing sessions to OMERO.web.
Hope that's of some us.
All the best,
Kenny