How Can I read the total number of active session in perspective? like the perspective session info page in gateway.
The [System]Gateway/Sessions/SessionCount always show 1.
Yes, I'd like to know this too!
Last I heard it was comming soon:
This is currently going through the QA process, and will most likely be available as one of the upcoming 8.0.7 nightly builds.
The usage will boil down to system.perspective.getSessionInfo([usernameFilter], [projectName])
where usernameFilter
and projectName
are optional arguments to filter down the returned session objects.
Is this a thing yet? I’d like to have a dashboard showing the number of Vision Clients and the number of Perspective Sessions for multiple gateways. Or using this script, can scripts be fired at gateways across the network?
Sure you could use system.perspective.getSessionInfo()
to get a count of active sessions. You’d want to set up some sort of timed script to trigger updates or your count won’t change as the session count changes.
If you want to send messages to other sessions you should use system.util.sendMessage("projectName", "handlerName", payload={"someKey":"someValue"}, scope="S")
and the project in question will need to have a configured Message Handler under Session Events.
If the gateway with the dashboard is the EAM controller of the other gateways, as of 8.1.16 there should now be an EAM tag available to keep track of currently opened sessions on agent gateways under [System]Gateway/EAM/<agent_name>/<redundant_mode>/Metrics/Sessions
Is there an update for this feature?
The question was if it's possible to get the active session count, and Cody provided the solution. Not sure what else you want to know?
However I believe system tags were also added under System/Gateway/sessions
Can we deduce with this how many users are logged-in in a project or even a perspective view/page?
Should be able to from the session info function
i tested cody's solution.
but the system tags are not accurate too.
it does display the if the user is using a browser / designer but the count is not accurate.
he was saying too that there will be an update on 8.3?
we are currently at 8.1.3
You should update.. That version is 4 years old😵 there were some significant changes to increase view performance, along with security updates etc that you're missing
That's v8.1.30, not 8.1.3... 3.5 years of difference!
ohh hahah, still we are experiencing this issue hahah
so we can confirm that its the ignition version that is causing this issue?
When you say the session counts are inaccurate, what do you mean? If any are missing from the count, that would be a bug. If it shows too many, that is likely an unfixable artifact of long session timeouts.