473,321 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Incoming Outgoing Bandwidth Traffic

Hey guys and gals, I was wondering how I could do a bandwidth traffice moniter on incoming and outgoing traffic on a network card. is there a simple way to moniter and record the traffic? I know of performance counter but did not get it working. Thanks for the help in advance. -Smartbomb
Nov 20 '05 #1
7 9993

"Smartbomb" <mo*******@hotmail.com> wrote in message
news:D_***************@nwrddc03.gnilink.net...
Hey guys and gals, I was wondering how I could do a bandwidth traffice

moniter >on incoming and outgoing traffic on a network card. is there a
simple way to >moniter and record the traffic? I know of performance counter
but did not get it >working. Thanks for the help in advance. -Smartbomb

Sounds like you have the answer to your own question: use the perfomance
counters.

Now what problem were you having?

David
Nov 20 '05 #2
Well I would put it into the program, fill out the information in the
properties section and well from there I wasn't sure how to have it
measure the network card's activity. I tired many ways but i just could
not get the counter to count heh. Any help with the counter would be
apperciated. Thanks for the quick reply and thanks again in advance.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3
Howdy SmartBomb,

What performance counter are you using? Do you know where there is a list
of the available categories and counters?

Regards,
Fergus
Nov 20 '05 #4


hi Fergus, i'm using the performance counter that is found under
Toolbox->Components->Performance Counter. And sorry I do not know a
list. -Smartbomb
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #5

"Fergus Cooney" <fi******@tesco.net> wrote in message
news:ON**************@tk2msftngp13.phx.gbl...
Howdy SmartBomb,

What performance counter are you using? Do you know where there is a list of the available categories and counters?

Regards,
Fergus


Run Perfmon.exe to see all the available counters.

And here's a sample for network monitoring.
It uses the network interface, you might want to monitor a different one or
all of them.
David

Imports System.Diagnostics
Module Module1

Sub Main()

Dim pc As New PerformanceCounterCategory("Network Interface")
Dim instance As String = pc.GetInstanceNames(0)
Dim bs As New PerformanceCounter("Network Interface", "Bytes Sent/sec",
instance)
Dim br As New PerformanceCounter("Network Interface", "Bytes
Received/sec", instance)

Console.WriteLine("Monitoring " & instance)
Do
Dim kbSent As Integer = bs.NextValue() / 1024
Dim kbReceived As Integer = br.NextValue() / 1024
Console.WriteLine(String.Format("Bytes Sent {0}k Bytes Received {1}k",
kbSent, kbReceived))
Threading.Thread.Sleep(1000)
Loop

End Sub

End Module
Nov 20 '05 #6
Hi SmartBomb,

I didn't mean which Control, I meant which category and counter. :-)

However I found out for myself where the list is. I think it may depend on
what version of VS you have, but in the Server Explorer (View menu) there is
the complete list. Woohoo! It may be that you are choosing the wrong counter
or that a combination would serve your needs.
Nov 20 '05 #7
Thanks David and Fergus! The code helped a lot. and the counter list
(which i did not know exsited) helped quite a bit as well. I was able to
piece them together with some edits and finally get it working! Thanks
guys!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: FLEB | last post by:
Is there a way to check my site's bandwidth usage via PHP? I'd like to "gracefully bail" if I start to get near my host's limit. Its running on a shared Linux box, on Apache 1.3.31 and PHP v4.3.3...
7
by: Adam Clauss | last post by:
I am trying to work-around a firewall which limits me to only being able to accept inbound connections on port 80. Unfortunately, I need to two different applications to be able to accept...
1
by: | last post by:
I cannot handle this.I can receive incoming but I cannot detect outgoing packets. I am using Windows XP no SP present. Thanks a lot for answers.
3
by: Jack Fox | last post by:
While stress-testing our ASP.NET app, we discovered a flaw in our test set-up, which also reveals a flaw in our ASP.NET configuration that we do not know how to address. We simulated too...
5
by: Björn Olsson | last post by:
Hello All. If I where to capture network traffic, dropping packets and modifying packets. I.e write firewall functionality. Which API or SDK would be the correct choice? I would prefer to do it...
0
by: Felf | last post by:
What I'm trying to do re-route all my network traffic to a remote computer - similar to a proxy service in a web browser, but I want to use my program to re-route ALL traffic coming out of my...
5
by: Jens | last post by:
Hello, I have been looking for some C-code which listens on a user-defined port for incoming data traffic. When data is received, the data is written to a file. I found some C-code (server)...
8
by: FrobinRobin | last post by:
Hi, I intend to use Ajax for a kiosk application, it's primary usage is to retrieve live data from my DB, it's a fairly small amount of data (5 fields, of small data size and limited to 15...
0
by: whatazor | last post by:
Hi all, I have thread that call a module which upload a file in a remote repository. A possible approach to calculate the time is tomonitor outgoing traffic of that thread. How can I do in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.