Click here to Skip to main content
Click here to Skip to main content
Go to top

Simple ICMP Service Monitor

, 6 Jul 2005
Rate this:
Please Sign up or sign in to vote.
An example of a moderately useful network utility.

Screen shot

Introduction

This simple lightweight application provides a solution for monitoring access to potentially critical network services.

Background

Working as a Network Administrator in an environment where the number of servers managed is continually growing, I had been looking for a simple utility like this one. I began the project in February and during my research came across FreePing available here. I reworked the UI and put together the source to "clone" it since I had already put in a great deal of effort at that point, and I was still interested in actually seeing how to write the code. FreePing is a nice utility and is available from tools4ever as a free download.

The ICMP class used in this demonstration was graciously provided as open source here. The timer was adapted from Mike Gold's EGG Timer demo which is available here.

How it Works

Once the Start button is pressed, the program reads the ini file and issues a ping for all of the hosts listed in the file. A separate thread is created for each host and it is passed the list view row as a parameter to allow it to control the information for that host's row. Threads are used to keep the user interface from waiting until the scan is completed to regain control.

At the completion of the scan initiation, a new thread is created which calls the Elapsed Time timer. This routine provides the information for the countdown clock located in the upper right portion of the main form. When the timer reaches 0, it is stopped and a call to the Monitors initialization routine is placed. The same routine is accessed by the Start button. This creates the Elapsed time loop needed to repeat the scans on regular intervals.

Points of Interest

This program was a learning experience and is the first application development I have undertaken. (I keep my rookie status.) This program demonstrates techniques for updating listview information, simple ini file creation without using interop services, a demonstration of how to load a CHM help file, and techniques for creating new execution threads.

It was for me a great learning project, which produced an application that I wanted, hopefully it will provide some useful purpose for others as well. The code is documented and should be easy to read but, I'll let you judge.

There is room for improvement, of course and I will be adding some features to the final revision.

History

June 2005

Aesthetics

  • Added a toolbar to allow for quick access to the application's functions.
  • Added a status bar and a progress bar to communicate with the user.

Functionality

  1. Re-wrote a large portion of the code, which allowed the correction of minor logic flaws.
  2. Corrected an error in packet reception which gave false results.
  3. Added new features to allow the user to adjust some of the program's parameters.
  4. Help file: updated the help file to reflect the changes.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

bill2006

Canada Canada
No Biography provided

Comments and Discussions

 
GeneralMy vote of 3 PinmemberVilmair10-May-14 14:25 
Generali get a cross thread operation not allowed PinmemberCool Smith9-Jun-11 22:28 
Generalits throwing an error: PinmemberTejpal Garhwal11-Sep-06 7:39 
QuestionIt does not work for https that need certificate PinmemberTejpal Garhwal11-Aug-06 6:41 
AnswerRe: It does not work for https that need certificate [modified] PinmemberTejpal Garhwal11-Aug-06 6:44 
GeneralRe: It does not work for https that need certificate Pinmemberaferende11-Aug-06 7:19 
GeneralRe: It does not work for https that need certificate PinmemberTejpal Garhwal11-Aug-06 8:00 
GeneralRe: It does not work for https that need certificate PinmemberDJ BlackEagle30-Oct-06 13:04 
Generalmain form couldnt be loaded in VS2005 help!! Pinmemberlizecn10-Aug-06 7:34 
GeneralI have error Pinmembermajedsale711-Feb-06 1:38 
QuestionIs possible to have a LOG file ? PinmemberKIMSENG5-Oct-05 5:38 
AnswerRe: Is possible to have a LOG file ? Pinmemberbill200611-Oct-05 7:29 
GeneralRe: Is possible to have a LOG file ? PinmemberKIMSENG12-Oct-05 21:03 
GeneralDelete, Enable/Disable Host PinmemberArbulo8-Jun-05 4:52 
GeneralRe: Delete, Enable/Disable Host PinsussBil20068-Jun-05 4:57 
GeneralNice....But what am I doing wrong PinmemberGeertD6-Jun-05 20:48 
GeneralRe: Nice....But what am I doing wrong PinsussAnonymous2-Jul-05 6:20 
GeneralRe: Nice....But what am I doing wrong PinmemberGeertD12-Jul-05 21:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 7 Jul 2005
Article Copyright 2005 by bill2006
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid