# Vision Client Running Status

**URL:** <https://forum.inductiveautomation.com/t/vision-client-running-status/80755>\
**Category:** Ignition\
**Tags:** ignition81, scripting, vision\
**Created:** [October 20, 2023, 10:31am UTC](https://forum.inductiveautomation.com/t/vision-client-running-status/80755 "2023-10-20T10:31:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Jimenez\_Ruiz](https://avatars.discourse-cdn.com/v4/letter/d/839c29/32.png) [@David\_Jimenez\_Ruiz](https://forum.inductiveautomation.com/u/David_Jimenez_Ruiz)\
**Post date:** [October 20, 2023, 10:31am UTC](https://forum.inductiveautomation.com/t/vision-client-running-status/80755/1 "2023-10-20T10:31:53Z")

</div>

Hi there,

Is any way to detect if Vision Client is running?

I want to create a Linux Service to monitor if the Vision Client is running or not. I do not know whether there is an internal socket or something I could use to "listen" or monitor whether the Vision Client is running.

Can anyone help me with this issue?  
Thanks in advance.

Regards,  
David.

---

<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:** [October 20, 2023, 12:32pm UTC](https://forum.inductiveautomation.com/t/vision-client-running-status/80755/2 "2023-10-20T12:32:29Z")

</div>

No, there's nothing to listen for. But java will show in the process list, and you can examine the process properties in the `/proc/` filesystem to confirm what it is.

---

<div class="post-metadata">

**Author:** ![jay](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jay](https://forum.inductiveautomation.com/u/jay)\
**Post date:** [October 20, 2023, 1:31pm UTC](https://forum.inductiveautomation.com/t/vision-client-running-status/80755/3 "2023-10-20T13:31:48Z")

</div>

Did you look at system.util.getSessionInfo() ?

---

<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:** [October 20, 2023, 2:13pm UTC](https://forum.inductiveautomation.com/t/vision-client-running-status/80755/4 "2023-10-20T14:13:17Z")

</div>

> [@jay](#):
>
> system.util.getSessionInfo() ?

And how would you call that in a client workstation if no Vision client is running?

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [October 20, 2023, 2:34pm UTC](https://forum.inductiveautomation.com/t/vision-client-running-status/80755/5 "2023-10-20T14:34:05Z")

</div>

Why is this needed? The gateway web interface can be used to see which clients are running.

---

<div class="post-metadata">

**Author:** ![Koen](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@Koen](https://forum.inductiveautomation.com/u/Koen)\
**Post date:** [December 29, 2023, 3:29pm UTC](https://forum.inductiveautomation.com/t/vision-client-running-status/80755/6 "2023-12-29T15:29:26Z")

</div>

Well, perhaps you have a HMI running and you want to make sure that the Vision Client is always up. If you wanted for example cron job that checks the status and starts a client if none is running....

Instead of looking through all the processes, you could try using the 'Java Virtual Machine Process Status', provided you're running OpenJDK, with the command 'jps'

See:  
[[https://opensource.com/article/21/10/check-java-jps](https://opensource.com/article/21/10/check-java-jps#:~:text=On%20Linux%2C%20you%20can%20view,running%20processes%20on%20your%20system.&text=You%20can%20use%20the%20ps,by%20piping%20output%20to%20grep%20.&text=OpenJDK%2C%20however%2C%20has%20its%20very%20own%20specific%20process%20monitor.)]([Check Java processes on Linux with the jps command | Opensource.com](https://opensource.com/article/21/10/check-java-jps#:~:text=On%20Linux%2C%20you%20can%20view,running%20processes%20on%20your%20system.&text=You%20can%20use%20the%20ps,by%20piping%20output%20to%20grep%20.&text=OpenJDK%2C%20however%2C%20has%20its%20very%20own%20specific%20process%20monitor.))

However - while I can get crontab to check the status of a running client (see below), I cannot for the life of me launch a Vision client with crontab. The script below works when ran from the command line, but crontab fails to open the Vision client. I changed permissions on the folders and files (chmod 777) but still no luck. It seems the native launcher just can't be launched by crontab...?? Even running under sudo crontab - no luck.

```auto
#!/bin/bash

if [! -z "$(jps -v | grep ClientLaunchHook)"]; then
   echo "Vision client is running."
else
    cd "/home/myuser/Downloads/clientlauncher" && "./clientlauncher.sh" scope=C project=Edge gateway.addr=127.0.1.1:8088:8043 windowmode=window useBundledJre=true
    echo "Vision client is NOT running, trying to restart."
fi

```
