Op 12-12-11 16:04, Mark Stunnenberg schreef: > Zoiets dan? > > valid_crash=10 > maxcrash=10 > count=0 > while [ true ]; do > starttime=`date +'%s'` > /usr/local/bin/app > endtime=`date +'%s'` > echo "crashed" | mail -s "app crashed" [email protected] > difftime=$(($endtime - $starttime)) > > if [ $difftime -lt $valid_crash ]; then > count=$(($count+1)) > fi > > if [ $count -gt $maxcrash ]; then > echo "maxcrash" | mail -s "app max crash" [email protected] > exit 1 > fi > done > > Als je applicatie nu binnen 10seconden crashed, telt die hem als > "valid_crash", bij 10x stopt die, alle crashes met een grotere interval > dan 10 seconden telt die niet als valid_crash en zal die gewoon blijven > loopen.
Hmmm, bedankt! Ik zal het eens testen, lijkt nu inderdaad alles te doen wat ik wil ;-) Groet, Paul. -- Paul van der Vlis Linux systeembeheer, Groningen http://www.vandervlis.nl -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]
