2

Is there a way to get traceroute information in java. I need to query an api we are working on and need to get timings for each of the services that are called by the externally exposed api. I'm thinking that the information in traceroute would be a good place to start (is there another way to do this?). I am currently using Apache HttpClient. It looks like there are methods in the api that give route information but I'm not seeing where I would get the time for each hop in this api. Does the Apache HttpClient support this, if so where in the api are the methods to get the traceroute information including the timings? I've found some information at the links below but I am not seeing how to get a list of hops and the time for each hop.

https://hc.apache.org/httpcomponents-client-4.3.x/quickstart.html

https://hc.apache.org/httpcomponents-client-4.5.x/tutorial/html/index.html

https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/conn/routing/RouteInfo.html

There is a post (Java - API support for traceroute?) that suggests there is an api for this but when I go to the links (https://github.com/JakeWharton/, https://github.com/JakeWharton?tab=repositories) there is nothing there when I search for "route".

John
  • 3,458
  • 4
  • 33
  • 54
  • You can also use packet capture by wireshark. Have you considered that? – Rishabh Agarwal Sep 14 '18 at 12:39
  • *"Does the Apache HttpClient support this?"* - No. – Stephen C Sep 14 '18 at 13:12
  • The 'route' in HttpClient is _HTTP_ level routing i.e. proxies, completely unrelated to IP-level routing and traceroute. Plus the timing for a service is never the same as the timing solely of network transmission, plus since the development of hardware switches in the 1980s the timing of network transmission for actual data is usually different than the timing of traceroute which often has to hit the control plane. – dave_thompson_085 Sep 14 '18 at 15:25

0 Answers0