Skip to content

Instantly share code, notes, and snippets.

@darron

darron/curl.sh Secret

Created August 10, 2015 05:13
Show Gist options
  • Save darron/fc8f01aec8c3c3fc2223 to your computer and use it in GitHub Desktop.
Save darron/fc8f01aec8c3c3fc2223 to your computer and use it in GitHub Desktop.
#!/bin/bash
CURL='curl -s --connect-timeout 3 --max-time 59 -w %{time_connect},%{time_appconnect},%{time_pretransfer},%{time_redirect},%{time_starttransfer},%{time_total} -o /dev/null http://127.0.0.1:8500/v1/catalog/services'
while [ 1 ]
do
OUTPUT=$($CURL)
DATE=$(date --rfc-3339=seconds)
echo "$DATE,$OUTPUT" | tee -a logs.txt
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment