Results 1 to 4 of 4

Thread: [RESOLVED] Monitor Internet Traffic.

  1. #1

    Thread Starter
    Fanatic Member BlindSniper's Avatar
    Join Date
    Jan 2011
    Location
    South Africa
    Posts
    865

    Resolved [RESOLVED] Monitor Internet Traffic.

    Hi all,
    I want to make a Small Traffic Monitoring Program for our house. Since in South Africa Internet is One of the many things that are way overpriced I want to monitor each computers traffic with a small Program since even when we are not at home for a day we might easily use 2 gigs of data. Somewhere a computer is downloading like mad?

    For a 4 mib(you only get 3.5 at most) line here Will cost you around R413(36 GBP/ 58 Usd) per month and One gig of data around R19(1.68 GBP/ 2.70 Usd) - R112(9.9 GBP - 15 USD).

    Ok enough Complaining. Each Computer in our house Connects to the internet either with lan or Wlan So is their a way to get how much traffic passes through one of those OR is there a way to monitor the total internet traffic regardless of how it connects to the internet ?

  2. #2
    Hyperactive Member
    Join Date
    Dec 2006
    Posts
    293

    Re: Monitor Internet Traffic.

    Something quick. Something like this? 5 textboxes and a timer set to 100 milliseconds
    Code:
    Imports System.Net.NetworkInformation
    
    Public Class Form1
        Dim Properties As IPGlobalProperties
        Dim StatV4 As IPGlobalStatistics
    
        Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            TextBox1.Text = ("")
            TextBox2.Text = ("")
            TextBox3.Text = ("")
            TextBox4.Text = ("")
            TextBox5.Text = ("")
            Properties = IPGlobalProperties.GetIPGlobalProperties
            StatV4 = Properties.GetIPv4GlobalStatistics
            TextBox1.Text = "Hostname: " & Properties.HostName & vbNewLine
            TextBox2.Text &= "Received: " & StatV4.ReceivedPackets & vbNewLine
            TextBox3.Text &= "Delivered: " & StatV4.ReceivedPacketsDelivered & vbNewLine
            TextBox4.Text &= "Discarded: " & StatV4.ReceivedPacketsDiscarded & vbNewLine
            TextBox5.Text &= "Forwarded: " & StatV4.ReceivedPacketsForwarded & vbNewLine
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Timer1.Start()
        End Sub

  3. #3

    Thread Starter
    Fanatic Member BlindSniper's Avatar
    Join Date
    Jan 2011
    Location
    South Africa
    Posts
    865

    Re: Monitor Internet Traffic.

    Hmm That looks good Except that that Counts Packets. Since packets can vary of sizes , It would be better to Count bytes if possible, But packets should also give an indication of where the most traffic is.

  4. #4

    Thread Starter
    Fanatic Member BlindSniper's Avatar
    Join Date
    Jan 2011
    Location
    South Africa
    Posts
    865

    Re: Monitor Internet Traffic.

    After quite a few google searches i Found that everything is Under NetworkInterfaces.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width