# Get the Total number of active sessions

**URL:** <https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942>\
**Category:** Ignition Early Access\
**Created:** [November 14, 2019, 7:35am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942 "2019-11-14T07:35:18Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [November 14, 2019, 7:35am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/1 "2019-11-14T07:35:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [November 14, 2019, 11:57am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/2 "2019-11-14T11:57:13Z")

</div>

Yes, I'd like to know this too!  
Last I heard it was comming soon:

> [@\[feature-14663\]Perspective Session Info](http://forum.inductiveautomation.com/t/feature-14663-perspective-session-info/29109):
>
> Is there any way to get perspective session information such as the number of sessions, users logged in, project name, etc… ? For Vision I use system.util.getSessionInfo() but this doesn’t get Perspective info. There are some Gateway Tags for Vision, but the Perspective sessions don’t contribute to this: [System]Gateway/Sessions/SessionCount How do I get this information?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 14, 2019, 8:44pm UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/3 "2019-11-14T20:44:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jcaudle](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jcaudle](https://forum.inductiveautomation.com/u/jcaudle)\
**Post date:** [April 7, 2022, 10:58am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/4 "2022-04-07T10:58:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 7, 2022, 4:01pm UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/5 "2022-04-07T16:01:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![osolorzano](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/osolorzano/32/6432_2.png) [@osolorzano](https://forum.inductiveautomation.com/u/osolorzano)\
**Post date:** [April 7, 2022, 10:44pm UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/6 "2022-04-07T22:44:35Z")

</div>

> [@jcaudle](#):
>
> I’d like to have a dashboard showing the number of Vision Clients and the number of Perspective Sessions for multiple gateways.

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`

---

<div class="post-metadata">

**Author:** ![Jesse\_Dale\_Gimenez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jesse_dale_gimenez/32/68763_2.png) [@Jesse\_Dale\_Gimenez](https://forum.inductiveautomation.com/u/Jesse_Dale_Gimenez)\
**Post date:** [March 21, 2025, 1:24am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/7 "2025-03-21T01:24:43Z")

</div>

> [@cmallonee](#):
>
> system.perspective.getSessionInfo()

Is there an update for this feature?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 21, 2025, 6:57am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/8 "2025-03-21T06:57:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![diamond](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@diamond](https://forum.inductiveautomation.com/u/diamond)\
**Post date:** [March 21, 2025, 7:24am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/9 "2025-03-21T07:24:08Z")

</div>

Can we deduce with this how many users are logged-in in a project or even a perspective view/page?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 21, 2025, 7:31am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/10 "2025-03-21T07:31:41Z")

</div>

Should be able to from the session info function

---

<div class="post-metadata">

**Author:** ![Jesse\_Dale\_Gimenez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jesse_dale_gimenez/32/68763_2.png) [@Jesse\_Dale\_Gimenez](https://forum.inductiveautomation.com/u/Jesse_Dale_Gimenez)\
**Post date:** [March 21, 2025, 7:33am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/11 "2025-03-21T07:33:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 21, 2025, 7:40am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/12 "2025-03-21T07:40:25Z")

</div>

> [@Jesse\_Dale\_Gimenez](#):
>
> 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

---

<div class="post-metadata">

**Author:** ![Jesse\_Dale\_Gimenez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jesse_dale_gimenez/32/68763_2.png) [@Jesse\_Dale\_Gimenez](https://forum.inductiveautomation.com/u/Jesse_Dale_Gimenez)\
**Post date:** [March 21, 2025, 7:57am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/14 "2025-03-21T07:57:12Z")

</div>

![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/a/aa2dedb242b70eb90c6a80f41017b85d737b5d90.jpeg)  
~~so~~~~ currently ~~~~we~~~~ are ~~~~on~~~~ 8 ~~~~.~~~~ 1 ~~~~.~~~~ 3~~  
~~but~~~~ our ~~~~IT~~~~ security ~~~~team~~~~ wont ~~~~update~~~~ to ~~~~the~~~~ latest ~~~~version~~~~ unless ~~~~they~~~~ feel ~~~~its~~~~ safe~~

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 21, 2025, 7:57am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/15 "2025-03-21T07:57:40Z")

</div>

That's v8.1.30, not 8.1.3... 3.5 years of difference!

---

<div class="post-metadata">

**Author:** ![Jesse\_Dale\_Gimenez](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jesse_dale_gimenez/32/68763_2.png) [@Jesse\_Dale\_Gimenez](https://forum.inductiveautomation.com/u/Jesse_Dale_Gimenez)\
**Post date:** [March 21, 2025, 7:58am UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/16 "2025-03-21T07:58:23Z")

</div>

ohh hahah, still we are experiencing this issue hahah

so we can confirm that its the ignition version that is causing this issue?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 21, 2025, 12:40pm UTC](https://forum.inductiveautomation.com/t/get-the-total-number-of-active-sessions/29942/17 "2025-03-21T12:40:35Z")

</div>

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.
