Click here to Skip to main content
15,849,328 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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# :)
Posted

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#[^]
 
Share this answer
 
Comments
Dave Kreskowiak 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 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 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 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,
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.
 
Share this answer
 
Comments
DinoRondelly 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 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 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 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 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900