We help IT Professionals succeed at work.

Need application for checking internet connection issue

Medium Priority
Last Modified: 2013-12-25
Hello experts,

We are small ISP providers and need a small application that can do basic internet troubleshooting for our customers like. ping ip address, ping default gateway, ping website and show the results. So that it saves our technicians time.

But million dollar question is which programming language to be used. Major OS is windows.

Please let us the know the programming language to be used and we can ask our programmers to work on it.

Thanks in advance
Watch Question

I would think most computers have Java installed and I would use a small java application that could do what you needed.


There are a lot of monitoring sites out there - we used HyperSpin and DNSStuff.

They have a lot of tools that might be easier.

But there is Detecting the UpTime of Web Server and Use WMI to get the system's up-time for ASP.NET if you are looking to offer some type of code to your webhosting clients.

Scripts: PHP: Server Uptime

For ping, traceroute, etc - just search for what you would like, i.e. asp.net code for ping - you will get some code(s) to provide,
Why reinvent the wheel?

hjgodeTier 3 Senior Technical Support Engineer
a) why do you want to re-invent the wheel?
b) although JAVA is preferred by many programmers, it is not available by default on any Windows or Linux system!
c) The only languiage that does need any  framework, like JAVA or .NET (1,2,3.5,4) is native Win32 programming. You may use MS MFC or other C/C++ libs, but then you have to link them statically.
There are already C samples out there: http://tangentsoft.net/wskfaq/examples/rawping.html is one that does not use icmp.dll but raw sockets.

d) you may assume that at least .NET 2.0 is usable on most windows systems, so you may use C# ping code (for example here: http://code.google.com/p/win-mobile-code/source/browse/trunk/PingAlert/ping.cs and article here: http://www.hjgode.de/wp/2011/03/01/mobile-development-pingalert-watch-your-servers-2/)

Possibly you get better answers if you be more specific.

>although JAVA is preferred by many programmers, it is not available by default on any Windows or Linux system!

True,but it's free ,the applets for testing are free,and are as robust as any out there,so why go through the hassle of writing code?

Every system I roll out has jvm installed.
Just because Sun and MS had a whizzing match over Java,is no reason not install it by default.

Wouldn't be caught without it.
I was going to say exactly what hjgode said.

Java is a language that programmers like, not users.  If you want hassle free deployment do not go with Java.  Imagine asking a user to run your program then making them wait for Java to download, install, reboot, deal with updates (assuming their internet connection is working at that point).  Then they complain you've slowed their PC down.  That vs. an executable that you could run from a USB stick.

Anything made with .NET won't run on any PC I have, its too much of a resource hog and like the Java VM, it serves no use except that programmers like it.  It's most popular in corporate environments, where the programmers can control the installed user base to some degree. You might have a hard time porting it to any other system and .NET programs are known to break with updates.

But a) is the most important answer, there are almost certainly programs in existence for doing this.

BTW, don't give me any points for this answer, I just wanted to support hjgode's answer.
I believe his situation is for customers who utilize them as an ISP and cannot or think they cannot get access to the internet.  So they can't just open a browser and go to a website to start pinging or traceroute, etc.  

Seems like they want a tool they can install when the customer signs up for service or maybe download from another system to a flash drive and then instead of them walking them through command line options they can run the tool to run some tests.

I disagree people don't have java, I have come across very few systems without atleast some version installed and a very simple java application doesn't need the latestest and greatest yo run.. and if it happens to point out that their version is out of date even better because they should be keeping that updated to avoid malware.

I could be wrong but that is how I understood his question.


Yes  DMTechGrooup

The first thing is that we will install a small application on our customer's PC , to let them ease with the troubleshooting steps, not everyone is tech savvy and can get us the data we would require for troubleshooting. So they can simply run the application and provide us the data.

Once data is with us, we will check if user has correct configuration setting on their end as they are with us or can troubleshoot further.

Secondly if internet is not working for them then in that case no internet based application will work.
Ok - so depending on what the client has, would you first want something to open the CMD and maybe do an IPCONFIG ?

From just previous experience on when my Internet goes down, this is usually where I turn to before I have to call the provider (because they always want me to plug the cable into the computer without going thru a router)

They changed their layout, but AuditMyPC had some tools on it that might help.  AutoHotKey might help as well.

Before this company, another company would ask my to ping www.abc.com.  

But what information would help you - the information from ipconfig ?  Maybe adding something to release / renew.
Most Valuable Expert 2011
Author of the Year 2014
This is a PHP example.

<?php // RAY_monitor_websites.php


// SEE: http://www.iana.org/assignments/port-numbers
// SEE: http://browntips.com/cpanel-and-whm-port-numbers/
$ports["HTTP"]     =    80;
$ports["FTP"]      =    21;
$ports["SSH"]      =    22;
$ports["DNS"]      =    53;
$ports["MYSQL"]    =  3306;
$ports["CPANEL"]   =  2082;
$ports["CPANEL-S"] =  2083;
$ports["WHM"]      =  2086;
$ports["WHM-S"]    =  2087;
$ports["POP3"]     =   110;
$ports["SMTP"]     =    25;
$ports["BOGUS"]    = 11111; // THIS IS EXPECTED TO FAIL

$urls[] = 'www.twitter.com';
$urls[] = $_SERVER["HTTP_HOST"];
$urls[] = 'www.example.com';
$urls[] = 'www.knownBogusUrlNumber42.org';

$out = array();
foreach ($urls as $url)
    $errno = $errstr = array();

    $timex = 1;

    // TEST EACH OF THE PORTS - SEE http://us.php.net/manual/en/function.fsockopen.php
    foreach ($ports as $port_name => $port_number)
        = @fsockopen // @MAKE ERRORS SILENT
        ( $url
        , $port_number
        , $errno[$port_name]
        , $errstr[$port_name]
        , $timex
        if ( (!$fp) && ($errno[$port_name] == 0) )
            $errno[$port_name] = 'FAIL';

    echo "<pre>"  . PHP_EOL;
    echo "URL: $url TIME: $timex";
    foreach ($errno as $port_name => $error_number)
        if (!$error_number)
            echo PHP_EOL . "OK: $port_name $ports[$port_name]";
            echo PHP_EOL . "ERROR $error_number: $port_name $errstr[$port_name] ON PORT $ports[$port_name]";

Open in new window

I have never tested it on Windows, but it runs fine on Linux.  Best regards, ~Ray

greetings  ashwin2012, , I done some with several programming languages and your question of = "Please let us the know the programming language to be used and we can ask our programmers to work on it.", does not really give me much to talk about, , , even with the added info of your last post = "install a small application on our customer's PC", does not narrow down much the language to use,  here's some thoughts -
I really do not think JAVA is the way to go for programs, it was a fantasy that you can make JAVA programs to work on several different OS, we tried that years ago and It was a compleat failure, due to having to Install the JAVA framework for you to run that program.

C# and Net seems to work on newer windows machines, but you will need the MS visual studio to program those.

Personally, for "small" programs that do utility work, like "internet troubleshooting", I'd pick C++ , with out using any framework, sticking with API calls, you can get free C++ compilers and linkers, but the MS VS does some optimized program outputs.

You may find that you do better with programs made for different platforms (windows, apple, linux), than some universal one size fits all thing.


>> Ok - so depending on what the client has, would you first want something to open the CMD and maybe do an IPCONFIG ?

Results from ipconfig /all will help us a lot.

We can tell if user is getting APIPA or not in case of XP?
We can ask user to do ipconfig /release and ipconfig /renew
restart DHCP client service
reboot pc to perform DORA(Discover, offer, request and acknowledge from DHCP server)

we can ping default gateway to check if it is not a connectivity issue between router and pc.

we can ping dns servers to check if connectivity is fine with dns servers.
we can ask them to try alternate dns severs if those are unreachable

I am not worried about platform as 99% of our customer line in on Windows(XP+Windows7)

This is an application to just get started, which we will further improvise with time to gather more troubleshooting steps. This is a test we are doing for our customers.



We will further develop it into a fully fledge network troubleshooting software for our customers to help them develop their knowledge about home networks and troubleshoot general network issue. As this is age of knowledge, we are keen to provide our customers with the knowledge, right approach and tools.
It seems AutoHotKeys is free - it might be easy to use.  I downloaded it / installed it, it seemed pretty easy.  

I'll trying to take a look at it tomorrow as well.  If you do download it and need a beta tester, let me know.
hjgodeTier 3 Senior Technical Support Engineer
So, I think your programmers should go with C/C++ and start with an app using the console for output (this will lower the possible problems you may get with doing a GUI).

The app should print all test results on screen and write a log file.

I would start with documenting the IPConfig settings. That means the list of network adapters and there IP settings. Possibly before IPconfig doc, you may go with a ping to localhost to check the stacks and protocols are in place.
Next would be a ping check against the router. For that a routing dump would be helpfull.
Then ping the DNS and do DNS lookups.

Then there are many other settings that may be  wrong. ARP lookup (wrong cached MAC or manually set), routing problems (traceroute), firewall settings....


For a pure Windows environment, what advantage does a programming language have over a batch file?

hjgodeTier 3 Senior Technical Support Engineer

A GUI is easier to use for windows users. You may afraid some windows users when you show them a command window ;-) ( that may also be true for web programmers that accidently look at html source code ;-)) )
A batch file is limited to what you can do at the prompt.  If the things you want to know and display are available that way, then its fine.  The prompt is an interface for running code written in other languages.

If you're working in C++ then you can have a friendly GUI interface, it can do anything the OS allows.  It can do timing, conditional and repeated actions, it can display only the information you need to the user in a simple form, it can talk to a server, etc.  Of course, the downside of all that is the extra effort it takes to make the program in the first place.

Like hjqode says, users are scared by command prompts, but you could always make an icon to run a batch file.
@  ashwin2012 , , , As You can see, there are several options, and some considerstions for the end user presentation (GUI or command line), however, I can't see how the programming languages for windows platform (even maybe visual basic) are the determining factor in a working productive user program from what you have said here. I would think that YOUR programmers you refer in  - "and we can ask our programmers to work on it." would know more about this language thing and it's problems or rewards than we would, since they may have programming production structures (version control, etc.) already in place, and if you do not already have an established "setting" (decision) on "to use a GUI or not", then some experimentation or finalizing of the needed production result (what the initial "final program" will look like and do) may be needed. . . . To me, good planing always helps, but I know that sometimes trying to "design" and plan a program is a headache , I usually "Start Simple and addOn later".

Thanks, hjgode and satsumo. I particularly take your point about the scary "Black Screen". (Of course you can be very sneaky and change its colour!)
I played a bit with that AutoKey, I was able to open the CMD run an ipconfig /all and arp -a thru them CMD.

Reading thru more of it, it seems like it will create a GUI to run that in the background as you would like.
Thank you guys,

Seems like our team found a way to generate troubleshooting tools using xml as most of the tools in Windows 7's Action Center are in xml. We totally support and encourage open source tools as explained in one of the suggestions, however we want to get our own.
We are open to any suggestions regarding xml.

For more details please check out this webcast:


Thanks and regards


Please allow me sometime to provide points as i will review the suggestions again to acknowledge best the one.


Thank you all for valuable suggestions definitely this is an add on.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.