#!/bin/bash
domain="$1"i=0j=0echo 'total, nstim, conne, appco, pretr, redir, statt'while [ 1 ]do((j++))mess=`curl -s -o /dev/null 2>/dev/null --write-out "%{time_total}, %{time_namelookup}, %{time_connect}, %{time_appconnect}, %{time_pretransfer}, %{time_redirect}, %{time_starttransfer}" $domain`time_total=`echo $mess |awk -F ',' '{print $1}'`check1=`awk -v num1="$time_total" -v num2=1 'BEGIN{print(num1>num2)?"0":"1"}'`if [ "$check1" -eq "0" ];then# echo "$mess" >> /tmp/${domain}.log 2>/dev/null echo "$mess" `date` $i/$j ((i++)) if [ "$i" -ge "1000" ];then exit 0 fifidone