Skip to content

Instantly share code, notes, and snippets.

@JulienSansot
Created March 4, 2015 09:46
Show Gist options
  • Save JulienSansot/5a413a3761548fdab1c8 to your computer and use it in GitHub Desktop.
Save JulienSansot/5a413a3761548fdab1c8 to your computer and use it in GitHub Desktop.
loop checking the http status code returned by the server. Every 0.5 seconds. Useful to check if there's no downtime while deploying a new version
while true; do curl -w %{http_code}:%{time_total} http://www.google.com/ -o /dev/null -s; printf "\n"; sleep 0.5; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment