curl sends empty reply, ping not allowed, how do I determine the time it takes to get response from that server without going high tech?

oslon

Member
Joined
Oct 15, 2023
Messages
40
Reaction score
6
Credits
424
I wonder.
There is an internal URL that our application needs which:
  • when curled sends "empty reply from server"
  • when ping "no response.....as it's disabled"
  • telnet works

How do I test how much time is it taking at various times of the day to send response? Any guidance will be appreciated.
 


OP mentioned ping is disabled.
Perhaps try the command: traceroute <destination>
The times will be given for each hop if more than one, so may need to be totalled up.
 
IIUC, the times mentioned by traceroute are the round-trip times it takes from where you are to successive hops toward your destination, so unless one of the routers along the way blocks the signals to further hops (which are then shown as just three stars) the last line will show the total time to your destination and back, or more or less the equivalent of a ping. No need to add them up. In any case, the last non-three-star line will give you a lower bound to the desired time, but the actual value can be quite longer than that.
 
OP mentioned ping is disabled.
Perhaps try the command: traceroute <destination>
The times will be given for each hop if more than one, so may need to be totalled up.
I have learned traceroute uses ping in backend so if there is no ping this makes no sense. Or iam wrong ? ICMP (ping) is a standard protocol if it not working its blocked by the firewall and he can set better rules to allow icmp for specific hosts.
 
I have learned traceroute uses ping in backend so if there is no ping this makes no sense. Or iam wrong ? ICMP (ping) is a standard protocol if it not working its blocked by the firewall and he can set better rules to allow icmp for specific hosts.
Traceroute does indeed use ICMP. You are not wrong. It wasn't clear whether it was the ping command that was disabled or the protocol, but on re-reading I can see the other interpretation I didn't make.

Using ncat may be useful since it does provide a time in its output:
Code:
[tom@min ~]$ ncat -v -z google.com 80
Ncat: Version 7.94SVN ( https://nmap.org/ncat )
Ncat: Connected to [2404:6800:4006:814::200e]:80.
Ncat: 0 bytes sent, 0 bytes received in 0.10 seconds.

Alternatively netcat with the time bash shell builtin:
Code:
[tom@min ~]$ time nc -zw30 google.com 80
real    0m0.118s
user    0m0.040s
sys     0m0.000s
 
Last edited:


Latest posts

Top