开发者

How to monitor internet bandwidth from Web page?

开发者 https://www.devze.com 2023-03-16 01:57 出处:网络
I wish to monitor the my internet bandwidth from a web page i create. Is it possible to handle 开发者_高级运维or read data packets by the web page from network adapter using Java(.jsp) code ? It shoul

I wish to monitor the my internet bandwidth from a web page i create. Is it possible to handle 开发者_高级运维or read data packets by the web page from network adapter using Java(.jsp) code ? It should be dynamic and should be able to update the page as soon as possible. EDIT: May be i was not clear. What i want is to monitor total upload and download speed, and also from each servers connect at the real time.So, as the uploads and downloads occurs from each server, the page be automatically updated. Somewhat like this:

 http://stackoverflow.com upload: 50KBps download: 35KBps
    http://www.facebook.com upload: 100KBps download: 10KBps
C:\program files\yahoo messenger.exe upload: 25KBps download: 12KBps

And the computer processes using the internet in the same way but in a web page not in a desktop application.


Is it possible to handle or read data packets by the web page from network adapter using Java

Leaving aside whether it is actually possible for the moment, in order to achieve this you'd need to implement a full TCP/IP stack within your Java code.

You also need to answer the question of what is it that you actually want to measure. For most web based applications, latency, caching and parallelism are far more relevant to page response times than bandwidth.

and should be able to update the page as soon as possible.

Makes me even more confused about what you're trying to achieve, and whether you'd be able to deliver something to meet that requirement.

Most hosting companies limit the amount of data you can transfer within a selected time period - and usually refer to this as a bandwidth limit - but it's quite different from the how much data the hardware can process and the rate at which it can process it (i.e. what you'd see in the TCP/IP packets). If you want to measure this then you'd need an exact definition of how the hosting company measures this - and the best place to suorce the data from is your webserver logs.

If you want to measure how responsive your pages are client-side and make allowances for the limitations of their network connection, then have a look at Yahoo Boomerang.

If you simply want to provide a self-service tool for users to measure their own bandwidth, then a java applet paired with a server side feed is probably the way to go - but remember to make multiple measurements with different sized 'files' and use a regression algorithm to measure the speed and latency.

0

精彩评论

暂无评论...
验证码 换一张
取 消