Although this isn’t the quickest way to ping a server, it is definitely one of the most useful pieces of code I have ever created. Take for example, if you are at home and you run 6 web servers at work and one goes down. 2 are external, and 4 only have internal I.P. addresses. If you have this script setup under a password protected directory on one of the 2 external servers, then the only way to ping the 4 internal ones would be to use this script, because pinging the name of an internal server, such as “InternalServer4”, will resolve the name on the network, which is local to that web server. This can’t be done over the Internet using standard ping commands.
If you can find a way to improve on this script and use it to help you diagnose your web farm, etc, then feel free to do so. Drop me a line at firstname.lastname@example.org to let me know how it goes!
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |