Total number of users logged in across all nodes

roxaneamanda1
Giga Contributor

Hi,

I would like to terminate all sessions, but going to the 'Logged in users' module only shows users logged into the same node which I am logged into.

Can someone please help me understand how I find the total number of users logged in across all nodes??

Thanks

3 REPLIES 3

pneuvil1
Mega Guru

Posted almost a year ago and still no answer.


Service Later.


tarunsingh
Tera Contributor

Check this link : Capture the users login for all the nodes.


we need to check table : sys_user_session same as logged in users but put the below filters and it gives logged in users currently in your instance irrespective of nodes.


name!=NULL^invalidated=NULL



Hope this helps.


Thanks,


Tarun


Dom Gattuso
Mega Sage

I've written the following server side script that iterates through all nodes and captures the sum of all users for each node: 

var total_users = 0;
var diag = new Diagnostics();
	
while (diag.nextNode()) {
   var diagNode = diag.getNode();	
   var ss = diagNode.stats.sessionsummary;
	
   if(ss){
      total_users  += parseInt(diagNode.stats.sessionsummary["@logged_in"]);
   }
}

gs.info(total_users);

You can put this into a UI Page (attached xml) and add it to a dashboard. The attached UI page will look similar to the single score report "Logged in users" which is a count of all records in the v_user_session table (showing all logged in users for the same node you are on): 

find_real_file.png

Hope that helps! 

Thanks, 

- Dom