Friday 1 October 2010

A new ping?

If like me you are a systems administrator and work with windows, you can sometimes find yourself rebooting boxes regularly (We'll not really if you are any good at your job)

But you will find yourself familiar with the command ping -t

This is all well and good, however just because the machine responds to a ping, doesn't mean it's going to let you RDP back onto it.

I wrote a console app in vb.net to get around this, what this app does is connect on a specified port to see if its listening, much the same as doing telnet servername 3389 and the usual control+c if you get a response would tell you.

The program is passed to arguments on the command line:

IsOpen.exe ServerName Port

For example

IsOpen.exe DC01 3389

This will return a message to whether it is or isn't responding based on whether a connection can be established.

The program is deliberately forced into an infinite loop to do the equivalent of a ping -t, just because I wrote it for myself and that's what I wanted!

Pressing Control + C will let you exit the app. (I was quite proud of finding that code on the Internet and I think it will be making it into all my future console applications) - Which are normally called ConsoleApplication1.exe ;)

Download it here: http://www.wallis2000.co.uk/isopen.rar

No comments:

Post a Comment