Click here to Skip to main content
Click here to Skip to main content

.NET DUMeter clone

, 10 Feb 2003
Rate this:
Please Sign up or sign in to vote.
A DUMeter clone, but with some better/different reporting features.

Sample Image - mydumeter.gif

Introduction

This is basically a DUMeter clone, but with some better/different reporting features. Being on a dialup connection, I like to see what's happening to my bandwidth. I have done this UI to be as unobtrusive as possible. Full UI customization and transparency is available. It will work on Win2K+ only as far as I am aware.

Source code

There was no big feat in doing this, so I wont bore you with the code. You can have a look. This is not really a programming article, but rather a very useful tool and replacement for DUMeter fans. You don't have to vote. Please note that the blank database is included with the source.

Usage

When running MyDUMeter for the first time, the option dialog should popup that allows you to select your interface. If anything goes wrong (for some reason), just delete the MyDUMeter.config file. Also make sure that the log.mdb (Access 2002 DB) is in the same directory and that you have at least MDAC 2.6 installed.

Some UI tips:

  • Mouse over on real-time graph shows bandwidth numbers. These numbers can always be shown via the Show Text menu.
  • Clicking on a report will bring up a tooltip with some extra stats for that "section".
  • All windows can be moved by clicking and holding down the mouse.
  • Double click real-time graph to show window border, the window can now be resized. Double click again to hide border.

Known problems and facts

  • When resizing the real-time graph, it goes on an acid trip. This is intentional. Select the size you like, and let it be. This is now fixed.
  • The average shown in the report's tooltip is the recorded average, in other words if only one log entry was made at say 10 kb/sec, then the whole section would reflect a 10 kb/sec average. IMHO this is better than using a general average.

Conclusion

I hope you find this utility handy. Any comments/suggestions welcome.

Updates

  • 1.1
    • Fixed small calculation "bug" in report tooltip.
    • Added better alignment in report.
    • Added a TypeConverter for machine name. Your PC can now be selected via dropdown box. Please recheck the interface, and make sure you have admin rights on the PC you like to monitor. A bit problematic using primitive remote debugging. I have no extra Windows PC on my network, so I had to send several versions to someone with no .NET knowledge to "debug" it. But it seems to work now.
  • 1.2
    • An empty access database is now embedded in the assembly. It will check for an existing database on start. The template database is now included with the source zip. All you need to do is the following: Add the "file" as embedded content to the project and add the code.
      if (!(File.Exists("log.mdb")))
      {
         Stream s = 
           Assembly.GetExecutingAssembly().GetManifestResourceStream
                                               ("MyDUMeter.log.mdb");
         Stream r = File.Create("log.mdb");
         int len = 8192;
         byte[] buffer = new byte[len];
         while (len > 0)
         {
            len = s.Read(buffer, 0, len);
            r.Write(buffer, 0, len);
         }
         r.Close();
         s.Close();
      }
    • Fixed "Fixed small calculation "bug" in report tooltip.".
    • MachineName "bug" is still there. Waiting for feedback.
    • Some more report options and stats.
  • 1.3
    • Added a pinger. Thank to Saurabh Nandu (or the original person who wrote it, there seems to be many people taking ownership of the code) for the base code. It will ping your desired host every 500ms and the text will displayed on the real-time graph.
  • 1.4
    • Added some more options. Ping interval and an option to hide the real-time graph when the connection goes idle. The graph will popup once the connection becomes non-idle.
    • Added much better resizing code. Redone the whole real-time graph painting.
  • 1.5
    • Thanx to Wilco B for pointing out a small problem. That has been fixed now.
    • Added very cool selection/highlighting feature for the report (see pic). Just right click hold and drag.
  • 1.6
    • Fixed many small cosmetic "bugs".
    • And thanx to Wilco B for pointing out the same problem in real-time graph.
  • 1.7
    • Many new cosmetic/stats features in Report. Selection can be zoomed into.
    • Real time graph can now be adjusted with mouse wheel (require wheel click to activate/deactivate). Shows a sluggish OSD.
    • Fixed a bug where focus will be stolen from the active window if real-time graph pops up when connection goes non-idle.
    • Removed the width constraint on the report. It was not really necessary at all. Smile | :)
  • 1.8
    • Added suggestion made by Kant.
    • Added make.bat for command line building (makes debug build).
    • Made all threads running at lower priority. Should help with CPU usage.

License

This article, along with any associated source code and files, is licensed under The BSD License

Share

About the Author

leppie
Software Developer
South Africa South Africa
No Biography provided
Follow on   Twitter

Comments and Discussions

 
GeneralGreat job can, need Vista gadget implementations Pinmembernemopeti25-Jan-07 11:19 

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.140827.1 | Last Updated 11 Feb 2003
Article Copyright 2003 by leppie
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid