# System Function for pinging an IP through script

**URL:** <https://forum.inductiveautomation.com/t/system-function-for-pinging-an-ip-through-script/58402>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [April 13, 2022, 7:03am UTC](https://forum.inductiveautomation.com/t/system-function-for-pinging-an-ip-through-script/58402 "2022-04-13T07:03:39Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [April 13, 2022, 12:14pm UTC](https://forum.inductiveautomation.com/t/system-function-for-pinging-an-ip-through-script/58402/5 "2022-04-13T12:14:53Z")

</div>

If it's just strictly pinging you can check this out

> [@Script to ping computer](https://forum.inductiveautomation.com/t/script-to-ping-computer/16612/10):
>
> Shelling out for this makes me feel very icky, especially when Java already has the native ability to do this and that’s an invitation to accidentally send horrible things to the command line. Why not just: def ping(address,timeout=2000): from java.net import InetAddress ip = InetAddress.getByName(address) return ip.isReachable(timeout) This will throw UnknownHostException if the host can’t be looked up, or IOException if the network is broken, so you can handle that case as well, instead o…

---

_[View the full topic](https://forum.inductiveautomation.com/t/system-function-for-pinging-an-ip-through-script/58402)._
