Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calculating number of hops

 
thomas Fuchs
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Does anyone know of how to calculate/figure out
the number of hops to a server
using java ?

for example: I open up a socket to 'x' from 'y'
how many hops is it from x to y ...

thanks
 
Darrin Cartwright
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Thomas,

Try exec() with the traceroute command. Something like:


If it has to be "pure" java, I'm afraid I can't help ya.
 
thomas Fuchs
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much
this will work great
much appreciated
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic