# Vision or Perspective list of running clients and terminate

**URL:** <https://forum.inductiveautomation.com/t/vision-or-perspective-list-of-running-clients-and-terminate/38471>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [September 8, 2020, 2:28pm UTC](https://forum.inductiveautomation.com/t/vision-or-perspective-list-of-running-clients-and-terminate/38471 "2020-09-08T14:28:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [September 8, 2020, 2:28pm UTC](https://forum.inductiveautomation.com/t/vision-or-perspective-list-of-running-clients-and-terminate/38471/1 "2020-09-08T14:28:10Z")

</div>

Using v8.0.16 vision or perspective…

Is there a way to list all clients in a table either in vision or perspective and then terminate via script? This can be done in the webpage, but was wondering if this is possible in vision or perspective.

---

<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:** [September 8, 2020, 3:09pm UTC](https://forum.inductiveautomation.com/t/vision-or-perspective-list-of-running-clients-and-terminate/38471/2 "2020-09-08T15:09:14Z")

</div>

```auto
sessions = system.perspective.getSessionInfo()
for sess in session:
    system.perspective.closeSession(sess.id)

```

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [September 8, 2020, 3:37pm UTC](https://forum.inductiveautomation.com/t/vision-or-perspective-list-of-running-clients-and-terminate/38471/3 "2020-09-08T15:37:09Z")

</div>

Thanks, not sure how I missed that. Is there a way to close for vision as well, I didn’t see that?

---

<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:** [September 8, 2020, 4:03pm UTC](https://forum.inductiveautomation.com/t/vision-or-perspective-list-of-running-clients-and-terminate/38471/4 "2020-09-08T16:03:41Z")

</div>

I’m not as familiar with Vision, but I do see a way to do something similar.  
You would need to perform the following steps:

1. When desired, trigger an event. This Event should invoke something like this: `systemutil.sendMessage(project='MyProject', messageHandler='VISIONSHUTDOWN', payload={}, scope='C')`
2. In the Designer, switch to the Vision context and configure a Client Event Message Handler with “VISIONSHUTDOWN” as the key, and for the script invoke `system.security.logout()`.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 8, 2020, 4:10pm UTC](https://forum.inductiveautomation.com/t/vision-or-perspective-list-of-running-clients-and-terminate/38471/5 "2020-09-08T16:10:18Z")

</div>

Or `system.util.exit()`, to be more directly analogous. Note that Vision has much less of a guarantee of success. The client has to be ‘alive’ to receive the message, not so busy that it handles it, and choose to exit.

Technically, Perspective has the same problem, in a way - closing the _backend_ session doesn’t actually close the tab/app/whatever on the user’s device - but because Perspective sessions _don’t work_ without the backend, it’s a lot more obvious.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [September 8, 2020, 4:16pm UTC](https://forum.inductiveautomation.com/t/vision-or-perspective-list-of-running-clients-and-terminate/38471/6 "2020-09-08T16:16:53Z")

</div>

Thanks guys.
