on 08-17-2006 10:00 AM
hi,
java Gurus
can u pls tell me how to find network bandwidth
regards
Guru
hi
good
you need to set up a connection using java.net.Socket and java.net.ServerSocket to another computer and transfer a large known amount of data at a time when the network is known to be quiescent and measure the time taken. Then bandwidth = bytes per second, or bits per second depending on what you want. You also need to take care that your sending and receiving code is optimal, which is mostly a matter of large socket send and receive buffers and local buffers in your code.
thanks
mrutyun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you can monitor server throughput using netstat -e (on a windows box).... If you wnat that in your application try somthing like this:
Runtime rt=Runtime.getRuntime();
Process p=rt.exec("C:
command /c netstat -e");
p.waitFor();
System.out.println("process"+p.exitValue());
-Roger
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.