5

I am developing a Network based Client Server Application where "internet time" is allocated to a client on the computer, which then logs in and use it, but I need a way to also monitor the bandwidth the client uses. I am writing in Java, I know it can be done as we are using such program currently(Bought it few years back) but it is outdated and lacking features.

If it might be an easier job to just monitor the usage of let say, IE, Firefox and Chrome?

Now I am looking for any links to tutorials, help, push in the right direction. I am lost to how to start at it. Tried searching the web, I got a few stuff but can't seem to get the code working as they only give in incomplete.

2 Answers 2

2

Here is the link to code which is termed as Internet Bandwidth Monitor. It is simple tool that monitors the uploads and downloads with graph.

Sign up to request clarification or add additional context in comments.

7 Comments

Hi, thanks. I checked it out, I can't get it to work though, I get a runtime error (java.lang.UnsatisfiedLinkError: no jpcap in java.library.path). It is somewhere at the network Interface. I am not even closely familiar with the coding used so I can't try and fix it. Would you mind running it on your side and see if you can shed some light onto the subject? That would be much appreciated.
it works perfectly. You need to add the APIs. jpcap is a API used in that code.
Thats weired, I Opened the project in Netbeans. It asked me to add the API, I Selected them all, them when I run it, it opens but counts no bandwidth: but I get this error: READ BELOW: Although all is added. I will try and re-add them all now
Exception in thread "Thread-2" java.lang.UnsatisfiedLinkError: no jpcap in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) at java.lang.Runtime.loadLibrary0(Runtime.java:845) at java.lang.System.loadLibrary(System.java:1084) at jpcap.JpcapCaptor.<clinit>(JpcapCaptor.java:251) at bandwidthcalculator.PacketMonitoringThread.run(PacketMonitoringThread.java:13) Total size and reset: 0.0 Total size and reset: 0.0 Total size and reset: 0.0
Well. i guess you are right. Something is wrong with the code. It was written by one of my friend. You can write review in the site so that he can fix the issue.
|
2

A servlet filter that does band width monitoring and possibly throttling might do nicely.

2 Comments

I didn't get you, how servlet filter do this job
@user2826111 HTTP request -> Servlet Filter 1 -> ... Servlet Filter n -> Servlet -> back to Servlet Filter n -> 1 -> HTTP response. So throttling, slowing down is possible. Band width monitoring needs a bit more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.