Skip to content

Instantly share code, notes, and snippets.

@henriquemenezes
Created August 28, 2025 15:06
Show Gist options
  • Save henriquemenezes/b30075fa922aba9866e7602c9679fb21 to your computer and use it in GitHub Desktop.
Save henriquemenezes/b30075fa922aba9866e7602c9679fb21 to your computer and use it in GitHub Desktop.
Network troubleshooting

Network troubleshooting

HTTP latency

curl with timing options

Simple curl:

# Basic HTTP latency test
curl -w "Connect: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n" -o /dev/null -s http://example.com

More detailed:

# More detailed timing breakdown
curl -w "@-" -o /dev/null -s http://example.com <<'EOF'
     time_namelookup:  %{time_namelookup}s\n
        time_connect:  %{time_connect}s\n
     time_appconnect:  %{time_appconnect}s\n
    time_pretransfer:  %{time_pretransfer}s\n
       time_redirect:  %{time_redirect}s\n
  time_starttransfer:  %{time_starttransfer}s\n
                     ----------\n
          time_total:  %{time_total}s\n
EOF

HTTPing

# Install httping
sudo apt install httping    # Debian/Ubuntu
sudo yum install httping    # RHEL/CentOS
sudo pacman -S httping      # Arch

# User httping
httping -c 10 http://example.com
httping -c 10 -p 443 https://example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment