Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Bandwidth Monitor

Just made a mini bandwidth monitor. It's pretty shitty not gonna lie but it works. It tracks current download/upload speeds, total bandwidth (since computer startup), and total bandwidth since reset.
There is an option to add to startup so it can automatically collect bandwidth data at all times.
You can also remove from start up easily.
*Remember to run program as admin before clicking 'add to startup' button

Right now it only takes the bandwidth data from the largest/most used network adapter. I could make it so it measures bandwidth individually on each adapter but I don't think it's really necessary.

You can chose which day of the month you want a reset and it gets saved. Any values saved in this program is just stored in a text file, didn't feel like serializing or using a database of any sort. Felt it was sufficient.

Image:Spoiler (Click to View)

Source:Spoiler (Click to View)

Application Only:Spoiler (Click to View)
poop
Whackzor, what interval did ya use for the reading , and where do you query the info, directly from the register or from the ManagementObjectSearcher ?
(Aug 1, 2014 09:19 AM)TheBarret Wrote:  Whackzor, what interval did ya use for the reading , and where do you query the info, directly from the register or from the ManagementObjectSearcher ?

Just used performance counters for the current download/upload speeds. Couldn't find any performance counters for total bandwidth.

To get total bandwidth, I looped through each NetworkInterface in NetworkInterface.GetAllnetworkInterfaces. Then I grabbed the IPv4stats using
NetworkInterface.GetAllNetworkInterfaces

Then for each ipv4stats object, I called ipstats.BytesReceived. I then chose the NetworkInterface (or networkcard) with the largest IPv4stats.BytesReceived value.

I've never used ManagementObjectSearcher so I'm not exactly sure how to use it
poop
Thanks man, everything that people think is shit others can learn from, thanks for the source
Actually looks pretty nice.

I will test it out.
Ooh nice! Thanks ;) Gonna test it out. ^^
[Image: s0lKFns.gif]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by sulphurNov 23, 2015 01:04 PM 4 259 Nov 23, 2015 01:04 PM
Last Post: hwchief
[.NET] by maruataAug 8, 2013 11:08 PM 83 4,831 Aug 8, 2013 11:08 PM
Last Post: maruata
[.NET] by elace31206Aug 28, 2012 11:04 PM 8 157 Aug 28, 2012 11:04 PM
Last Post: memesbro