# Pinging from ignition

**URL:** <https://forum.inductiveautomation.com/t/pinging-from-ignition/3052>\
**Category:** Ignition\
**Created:** [June 30, 2011, 6:10pm UTC](https://forum.inductiveautomation.com/t/pinging-from-ignition/3052 "2011-06-30T18:10:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [June 30, 2011, 6:10pm UTC](https://forum.inductiveautomation.com/t/pinging-from-ignition/3052/1 "2011-06-30T18:10:07Z")

</div>

any ideas on this? I found some earlier posts but it seemed like fpmi had a add in specifically for this. Does something similar exist like this for ignition?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [June 30, 2011, 6:27pm UTC](https://forum.inductiveautomation.com/t/pinging-from-ignition/3052/2 "2011-06-30T18:27:54Z")

</div>

Did you see [this topic](http://inductiveautomation.com/forum/viewtopic.php?f=70&t=5875&p=15681&hilit=ping#p15681)?

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [June 30, 2011, 8:10pm UTC](https://forum.inductiveautomation.com/t/pinging-from-ignition/3052/3 "2011-06-30T20:10:00Z")

</div>

Kyle Chase 's option seems like what I want to do but I am not sure how to display the results. can anyone help with that?

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [July 1, 2011, 7:09am UTC](https://forum.inductiveautomation.com/t/pinging-from-ignition/3052/4 "2011-07-01T07:09:38Z")

</div>

What information do you need? To print the actual text, the same as it would be output from the console, use the following

[code]  
success = 0  
out = app.run.execute(“ping [www.google.com](http://www.google.com) -n 1”)

for row in out[0]:  
print row //prints the row the same as the output from the console  
if row.rfind("Received = ")!=-1:  
row = row[row.find(“Received = “)+11:]  
success = int(row[:row.find(”,”)])

print success //prints the number of valid pings[/code]

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [December 13, 2011, 10:18pm UTC](https://forum.inductiveautomation.com/t/pinging-from-ignition/3052/5 "2011-12-13T22:18:04Z")

</div>

Finally got around to playing with this and it works great except for one thing! Our network has alot of users logging in from the internet, so they are not able to ping devices that are on our internal network. Of course if I VPN into the network it works. Is there any way to possibly have the ping function run from the gateway side and pass the results to the client?

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [December 13, 2011, 10:49pm UTC](https://forum.inductiveautomation.com/t/pinging-from-ignition/3052/6 "2011-12-13T22:49:00Z")

</div>

You could try using a Gateway Script to run this code and stick the results into a DBTag. This means it will only run from one place (the computer with Ignition installed on it) and every client can access the results.
