BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} Timing a script
Hi,
using `date` you might set two variables STARTTIME at the beginning and
ENDTIME at the end of the test and compare those two:
ksh:
DATE=`date +%Y....`
STARTTIME=$DATE
do_the_test
ENDTIME
DIFF=`(expr $ENDTIME - $STARTTIME )`
if [ $DIFF -gt $LEVEL_YELLOW ]
then
COLOR=yellow
if [ $DIFF -gt $LEVEL_RED ]
then
COLOR=red
fi
fi
perl:
$t0 = time;
do_the_test;
$elapsed = time - $t0;
if ( $elapsed <= 6 ){
$STATUS = $OPTIMAL;
}
elsif ( $elapsed <= 12 ){
$STATUS = $WARNING;
}
else {
$STATUS = $CRITICAL;
}
Rolf
Hello,
I have a script which does a test imap procedure but I would like BB to
time how long this procedure takes and alert me if it takes too long, is
this possible in BB and any pointers in the right direction would be
great. I am using 1.9e.
thanks
--
Mit freundlichen Gruessen
Rolf Schrittenlocher
HRZ/BDV, Senckenberganlage 31, 60054 Frankfurt
Tel. Sammelnr. LBS: (49) 69 - 798 28830
Fax: (49) 69 798 28817
LBS: lbs-f@mlist.uni-frankfurt.de
Persoenlich: schritte@rz.uni-frankfurt.de
Tel: (49) 69 - 798 28908
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.
Home |
Main Index |
Thread Index