# Ignition 8.1 - Ping Script

**URL:** <https://forum.inductiveautomation.com/t/ignition-8-1-ping-script/49939>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [August 15, 2021, 11:24pm UTC](https://forum.inductiveautomation.com/t/ignition-8-1-ping-script/49939 "2021-08-15T23:24:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark.benedicto](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mark.benedicto/32/27346_2.png) [@mark.benedicto](https://forum.inductiveautomation.com/u/mark.benedicto)\
**Post date:** [August 15, 2021, 11:24pm UTC](https://forum.inductiveautomation.com/t/ignition-8-1-ping-script/49939/1 "2021-08-15T23:24:19Z")

</div>

Hi all,

Refer on the code below, I’m trying to ping a site using subprocess.Popen, the expected result is to have the outputs from the console (i.e. Request Timed Out, packets sent/received, etc) be written on a string memory tag. However, nothing is being written on the tag, it seems like the thread is getting lost in the process.

The script is being executed on a timer with the following configuration:

- Delay Type: Fixed Delay
- Delay (ms): 30,000
- Threading: Dedicated

Code:

```auto
import subprocess

def ping():
	
	system.tag.writeAsync(paths, values)
	proc = subprocess.Popen(["ping", "-c", "1", "-i", "180", "google.com"], shell=False, stdout=subprocess.PIPE)
	outs,err = proc.communicate()
	
	paths = ["[default]Trial Site/Connectivity/Latency"]
	values = [outs]
	system.tag.writeAsync(paths, values)
	
ping()

```

Please let me know if you need additional information.

Cheers!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 16, 2021, 12:11am UTC](https://forum.inductiveautomation.com/t/ignition-8-1-ping-script/49939/2 "2021-08-16T00:11:24Z")

</div>

What OS and Ignition version? Any chance you’re running in a Docker container?

Assuming Linux, this thread has some good information about why it might not be working, container or not: [Popen with ping doesn't work in a Docker container - #11 by ken.maze](https://forum.inductiveautomation.com/t/popen-with-ping-doesnt-work-in-a-docker-container/47355/11)

---

<div class="post-metadata">

**Author:** ![mark.benedicto](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mark.benedicto/32/27346_2.png) [@mark.benedicto](https://forum.inductiveautomation.com/u/mark.benedicto)\
**Post date:** [August 25, 2021, 4:02am UTC](https://forum.inductiveautomation.com/t/ignition-8-1-ping-script/49939/3 "2021-08-25T04:02:35Z")

</div>

Thanks for this! Cheers.
