Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
I am using vb.net and i am trying to monitor bandwidth usage for each user connected to the server. I already have a list of connected users and their IP Address. Has anybody done anything like this your help would be greatly appreciated.
 
PS. Would perfer vb.net examples but will settle for c# Smile | :)
Posted 13-Nov-12 18:01pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can develop your on application by capturing network packets and then save the amount of data carried by each packet which will give you the exact amount of data consumed by each ip or mac address on the network.
 
see also:
A Network Sniffer in C#[^]
  Permalink  
Comments
Dave Kreskowiak at 14-Nov-12 0:41am
   
No it won't. It'll give you just the data that passes by the machine doing the sniffing.
 
Truthfully, you don't need a sniffer to do this.
DinoRondelly at 14-Nov-12 9:47am
   
I have to agree with Dave, I dont need a running count of the bandwidth used basically I just need a snap shot of the bandwidth usage when my application starts from the start of the users session.
 
Thank you for your reply,
Dave Kreskowiak at 14-Nov-12 10:46am
   
The problem is that Windows doesn't track the bandwidth used of individual users. The bandwidth stats are tracking by network adapter only.
DinoRondelly at 14-Nov-12 11:23am
   
I think i need to use WTSQuerySessionInformation,this seems like it should be able to return the information I need. I am investigating now and will update this post if I find a solution.
 
Thanks for your help,
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

What kind of server are we talking about??
 
You could just write a proxy that takes the incoming requests sends them to the actual server and returns the data to the client, keeping track of the amount of data passed. Kind of a "man in the middle". But, this depends entirely on the kind of server you're talking about.
  Permalink  
Comments
DinoRondelly at 14-Nov-12 1:19am
   
These are windows servers, hope that helps. I have been looking into packet sniffers and playing with those with limited lucky at the moment.
Dave Kreskowiak at 14-Nov-12 7:45am
   
Not really. The server is the software that's listening on the Windows Server. What kind of server are your clients talking to??
DinoRondelly at 14-Nov-12 10:15am
   
I am not sure what you mean, the server i guess would be considered a workstation that is running windows server 2008 R2 at the moment but the version could change from server to server. Basically the company I am working for wants an all in one tool that has some of the same functionality as the remote desktop service manager. Forgive if i didnt provide the correct information about the server.
Dave Kreskowiak at 14-Nov-12 10:34am
   
What are you're clients connecting to on the server?? Is it some database engine, network share, custom server app, web server, FTP server, Terminal Services, ...
DinoRondelly at 14-Nov-12 10:37am
   
The are using CRM software on the server as well as accessing databases.
 
I dont need to monitor the traffic i just need a snap shot of what has been used in the users session to the point when my application starts.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.141022.2 | Last Updated 14 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100