????

Your IP : 18.221.20.159


Current Path : /nutscripts/
Upload File :
Current File : //nutscripts/check_http_time.sh

#!/bin/bash

WAR=2;
CRI=10;
time="/usr/bin/time"

tiempo=`/usr/bin/time -o /nutscripts/tmp/apache_file -f "%e" /nutscripts/apache_dump.sh >/dev/null 2>&1`
seg=`cat /nutscripts/tmp/apache_file | awk -F "." '{ print $1 }'`

if [ $seg -ge $WAR ] && [ $seg -lt $CRI ];then
        echo "El apache responde en: $seg segs"
        exit 1
fi
if [ $seg -ge $CRI ]; then
        echo "El apache esta respondiendo en: $seg segs!!"
        exit 2
fi
        echo "Respuesta ok en $seg segs"
        exit 0