I am new to networking and I wanted this kind of environment. is there any way to measure network latency using ping between two hosts, given the condition you are not logged into either of the hosts? I.e you are in a 3rd host and you wanna measure latency between 1 and 2. Will that be possible?
To be more specific, I have a list of servers in a file called as "hosts". I want to measure latency between every one of those like a star connectivity. Will it be possible to do? I have come up with a rough algorithm like this:
for each in hosts:
ssh into each
for all in hosts:
if each != all:
ping all.
But once you ssh into a different host, how to make the program running is my question.
Thank you in advance