Re: How to get the Internet Speed



On Thu, 2006-03-30 at 23:34 -0800, moumitaghosh@xxxxxxxxxxxxxxx wrote:
hi all,
I need to get the internet speed,how can i get this

Transfer a stream of bytes across a socket and measure the time elapsed.

You might be able to make some native query to get signal rate of an
interface, but that won't tell you anything (you can have a 100Mb
ethernet to a router that's connected via 56K)

Networks can be asymmetric, can vary from one moment to the next, can
have all kinds of different latency issues. If you want, say, a
webservice to know if the client is on a dialup versus a broadband
connection, the best thing to do is ask the user. If that's not an
option

If you can trust the client clock and have enough precision, you could
have it send you a timestamp and get a rough idea of the transfer rate.
Or you could possibly make this transparent on the server side with a
redirect. There might even be a way to do this in an Apache bridge with
a servlet container like Tomcat.

If it's just a client program that wants to get the transfer rate from
the host it's running on, you could just make it do an http get against
google or ietf.org something reliable like that, and measure the time it
takes for the bytes to arrive.

Maybe there are better ways.

.



Relevant Pages

  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #3]
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... kernel socket family. ... presentation side is left to the client. ... Each connection goes to a particular "service". ...
    (Linux-Kernel)
  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... Make it possible for the client socket to be used to go to more than one ... Each connection goes to a particular "service". ...
    (Linux-Kernel)
  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #2]
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... Make it possible for the client socket to be used to go to more than one ... Each connection goes to a particular "service". ...
    (Linux-Kernel)
  • [PATCH 00/16] AF_RXRPC socket family and AFS rewrite [try #3]
    ... The first of these patches together provide secure client-side RxRPC ... connectivity as a Linux kernel socket family. ... Make certain parameters (such as connection timeouts) userspace ... the connectaddress of a client socket by making use of msg_name in the ...
    (Linux-Kernel)
  • [PATCH 00/16] AF_RXRPC socket family and AFS rewrite [try #4]
    ... The first of these patches together provide secure client-side RxRPC ... connectivity as a Linux kernel socket family. ... Make certain parameters (such as connection timeouts) userspace ... the connectaddress of a client socket by making use of msg_name in the ...
    (Linux-Kernel)