For H2 use:
select * from information_schema.sessions;
For MySQL use:
show full processlist;
or
select * from information_schema.processlist;
If you're just interested in session counting, use select count(*)
instead of select *
Thomas mueller
source share