Search code examples
sessionxpageslotus-dominolotus

How can i count currently connected users in my lotus application (nsf)?


I have an xpage application and i simply want to count open sessions (anonymous users) or logged in users or both, and display this info on a page. This question http://bit.ly/1sUMt8m is still open without solution.

Any ideas how to do that?


Solution

  • You can obtain this information from the console. show users will give you all users and their open databases. show opendatabases shows the databases and reads. See the documentation for details.

    So you could use sessionAsSigner and issue the console command from your code. Add -xml to get the response in a format you can parse with certainty. The measure is slightly crude since a user could have closed a window while the session is still valid.

    Short of that you would need some JS trickery