Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2006
    Location
    Bulgaria
    Posts
    12

    Question How to measure network latency to service without ICMP/ping?


    Hello,

    Do you know way to measure network latency of service which running on specific port number and all other traffic to the same server is blocked?

    For example I want to know latency between my PC and some of this services:

    194.8.15.167:10443
    95.138.142.172:443

    I can open telnet session without problems, but I don't know how to measure the latency of this session?

    I try with:

    httping -g http ://95.138.142.172:443
    httping -g https ://95.138.142.172:443
    or

    httping -g http : //194.8.15.167:10443
    httping -g https : //194.8.15.167:10443
    but received 100% packet loss, because the services are into Internet, but they are not served by standard web servers.

    Thank you in advance!

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    4,031
    Define "not standard web servers".
    If they are webservers, just on a different port, then httping should work.

    But you can go down to the transport layer and send tcp packets.
    There is tcpping, but this is not available via default repositories.

    Try mtr or tcptraceroute.
    eg:
    Code:
    mtr --tcp --port 443 95.138.142.172
    Edit:
    Be aware of what you measure, though:
    tcpping actually establishes a http connection and downloads <stuff>, therefore interacting with the web and/or applicationserver.
    mtr just sends SYN packets. This does not impact your web/app server, just the tcp/ip stack of the kernel.
    Last edited by Irithori; 09-29-2015 at 02:54 PM.
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Sep 2006
    Location
    Bulgaria
    Posts
    12
    10x Irithori

    I think that tcpping is correct application. I download the file from www . vdberg . org / ~ richard / tcpping

    I want to measure latency of Forex MetaTrader servers - metaquotes . net / en / metatrader4 because I think that some brokers and/or VPS providers lie about the latency to their services. Usually brokers don't tell the ip addresses of their servers, but I found them with netstat. Unfortunately they are blocked everything except the traffic to port where MetaTrader server works.

    Do you think that tcpping giving me correct results?

  4. $spacer_open
    $spacer_close
  5. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    4,031
    It sends only syn packets, just like mtr.
    Which means you measure the network latency between your machine and the remote host.

    It says *nothing* about the performance of the actual service.
    So you can have low latency via tcpping, but at the same time an actual request to this trader service might take long or even time out.
    You must always face the curtain with a bow.

  6. #5
    Just Joined!
    Join Date
    Sep 2006
    Location
    Bulgaria
    Posts
    12
    Do you know for tool which can measure actual performance of the service?

    For example I tried:
    Abadon:~$ telnet 88.85.91.24 443
    Trying 88.85.91.24...
    Connected to 88.85.91.24.
    Escape character is '^]'.
    heloo
    Connection closed by foreign host.
    Abadon:~$
    but I don't know how to measure how fast I'm opening telnet session to the service?

  7. #6
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    4,031
    -->
    That depends on the specifics of the service.

    For example, if I wanted to check this linuxforum here:
    It (obviously) uses http, so curl comes to mind as a tool.
    I would pick an URL that not only requests a static element but also involves DB queries.
    This provides a more general idea if the forum is alive, because webserver and DB are needed for a valid answer.

    Such as "Today´s Posts": http://www.linuxforums.org/forum/sea...e=vBForum_Post

    You can tell curl to print timing details, as described in the man page and e.g. here https://josephscott.org/archives/201...ils-with-curl/
    The output looks like this:
    Code:
    $ curl -w "@curl-format.txt" -o /dev/null -s "http://www.linuxforums.org/forum/search.php?do=getdaily&contenttype=vBForum_Post"
        time_namelookup:  0.274
           time_connect:  0.397
        time_appconnect:  0.000
       time_pretransfer:  0.397
          time_redirect:  0.000
     time_starttransfer:  0.939
                        ----------
             time_total:  0.939
    The curl-format.txt file can easily be changed to define a more machine readable format, so that you can use the output in a graphing/monitoring solution of your choice.

    A monitoring script would also need to react to error conditions, aka: What happens if curl cannot connect or there is a 404, or...


    TL;DR: Look at this trader service and find a request that indicates that the service is alive and well.
    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •