View Single Post
  #2  
Old 13th June 2013, 22:03
moegeler moegeler is offline
Junior Member
 
Join Date: Jun 2013
Location: Iserlohn, Germany
Posts: 4
Thanks: 1
Thanked 1 Time in 1 Post
Default

I don't know wich Linux Distri do you have but try some like this:

Code:
#!/bin/sh
VAR_TIME="$( TIMEFORMAT='%R';time (wget -p --no-cache --delete-after www.linuxweblog.com -q) 2>&1 1>/dev/null )"

float_test() {
     echo | awk 'END { exit ( !( '"$1"')); }'
}

float_test "$VAR_TIME > 30.000" && /etc/init.d/apache2 restart
save this as a shell file like monitor.sh an then make a cronjob for this...

I don't have tried it, so i don't know if it works...

Last edited by moegeler; 13th June 2013 at 22:05.
Reply With Quote