bandwidth

Measuring Internal Network Speed/Bandwidth in Java

拥有回忆 提交于 2019-12-08 21:18:34
I need to be able to monitor the speed of my internal network using java. I was thinking I could use a two part system with a server and a client. I do not need need response time such as what is generated with ping but and actual speed in mbps for upload and download. My idea would be to have the Server send a packet or series of packets to the client which then replies and then the Server would calculate the speed of the network between those two points. Does anyone have any idea how I could implement this? Thank You ahead of time. Hmm, an interesting problem. I hope you like reading... :-)

java how to show user friendly formatted output regarding bandwidth speed during download

此生再无相见时 提交于 2019-12-08 10:00:31
问题 Want to show nicely formatted output regarding bandwidth speed during download I have this calculation below thanks to @Tomasz Nurkiewicz, and it show mega* bytes * per second when i download a file. long start = System.nanoTime(); long totalRead = 0; final double NANOS_PER_SECOND = 1000000000.0; final double BYTES_PER_MIB = 1024 * 1024; while ((val = bis.read(buffer, 0, 1024)) > 0) { //... totalRead += val; double speed = NANOS_PER_SECOND / BYTES_PER_MIB * totalRead / (System.nanoTime() -

What does “bottleneck” mean in terms of bandwidth?

岁酱吖の 提交于 2019-12-08 09:25:42
问题 What is a "bottleneck", particularly when used in terms of network bandwidth? 回答1: A bottleneck is the "slowest" part of a system. If you examine a beer bottle, the neck is smaller than the base and so limits the amount of sweet wonderful nectar that you can drink. Mmmm! Beeer! (sorry, got carried away). In terms of bandwidth, it's the slowest device in the chain. For example, it makes little difference having gigabit ethernet on your PC if your router only runs at 10meg. The router there is

Measuring Internal Network Speed/Bandwidth in Java

陌路散爱 提交于 2019-12-08 04:18:21
问题 I need to be able to monitor the speed of my internal network using java. I was thinking I could use a two part system with a server and a client. I do not need need response time such as what is generated with ping but and actual speed in mbps for upload and download. My idea would be to have the Server send a packet or series of packets to the client which then replies and then the Server would calculate the speed of the network between those two points. Does anyone have any idea how I

bandwidth throttling with Qt

泪湿孤枕 提交于 2019-12-07 19:51:38
问题 I'm using the QNetworkAccessManager to download files from the web, it provides an easy API to the task. But I wish to add a download rate limit to the class, so all http replies won't exceed that limit (I see no reason to limit the requests). I've googled abit and found an interesting post here. But what it does is subclass QTcpSocket and gives control over the bandwidth using a separate class that manages a set of sockets. While this is nice I want to continue using the QNetworkAcessManager

How can I monitor / limit network traffic used by my app?

一笑奈何 提交于 2019-12-07 18:41:49
问题 I would like to be able to measure network traffic and limit it. I'm looking for something that lets me know between two calls how much data has been sent and received. Also, I would like to be able to limit network traffic (in & out) for my app. Something like the NetLimiter software (great app!) but which I can control from my code. Do you know some third party components to do this ? This is meant to be used on a datasnap 2009 thin-client. 回答1: If you use Indy, then use the

How can I monitor / limit network traffic used by my app?

∥☆過路亽.° 提交于 2019-12-06 12:37:05
I would like to be able to measure network traffic and limit it. I'm looking for something that lets me know between two calls how much data has been sent and received. Also, I would like to be able to limit network traffic (in & out) for my app. Something like the NetLimiter software (great app!) but which I can control from my code. Do you know some third party components to do this ? This is meant to be used on a datasnap 2009 thin-client. If you use Indy, then use the TIdInterceptThrottler class. Simply set the BitsPerSec property. My understanding is that DataSnap is based on Indy. If you

How to calculate bandwidth using c#

老子叫甜甜 提交于 2019-12-06 09:57:07
I want to measure bandwidh using c#. Here what I did. Comments and suggestions are welcome. Find maximum udp payload(on my test bed, its 1472 byte) Create non compressible data with 1472 byte size Send this data from a server to a client multiple times(on my test, its 5000 packets) Client start stopwatch at the time the first packet arrive When all data has been sent, send notification to client stating all data has been sent Client stop stopwatch I calculate bandwidth as (total packet sent(5000) * MTU(1500bytes)) / time lapse I notice that some packets are loss. a best, 20% loss. at worst 40%

Measure data transfer rate over tcp using c#

孤街浪徒 提交于 2019-12-06 07:16:29
i want to measure current download speed. im sending huge file over tcp. how can i capture the transfer rate every second? if i use IPv4InterfaceStatistics or similar method, instead of capturing the file transfer rate, i capture the device transfer rate. the problem with capturing device transfer rate is that it captures all ongoing data through the network device instead of the single file that i transfer. how can i capture the file transfer rate? im using c#. Since you doesn't have control over stream to tell him how much read, you can time-stamp before and after a stream read and then

Get the current bandwidth use in Linux with PHP

蓝咒 提交于 2019-12-06 05:24:52
问题 I have a server with OpenVZ installed and virtual machines with a public IPv4 for every machine. I need to get the bandwidth usage of each separate virtual machine (mbps or kbps) from PHP. My idea is to install iftop on the host machine and run it from PHP function exec(), the command "iftop -n -F AA.BB.CC.DD/32". The problem is that is an application iftop "top" style, and is made to run on a real terminal and is updated with new data. I can not install anything on the VMs, should be clean.