2 QIZX="/raid0/kn/qizx/qizx-fe-4.1p1/bin/qizx.alarm"
9 QIZXPIDS=`ps xwww --format "%p,%a" | grep java | grep qizx | cut -f 1 -d ' '`
14 KILLED=`ps aux | grep '^'$i`
20 rm -f /raid0/kn/qizxlib/*/lock
23 o=/raid0/kn/qizx/qizx-fe-4.1p1/bin/qizx -g /raid0/kn/qizxlib/ -l xmark -check /tmp/log >/dev/null 2>&1
34 trap stop_qizx INT TERM
43 echo 'let $doc := collection("'"$doc"'") return count($doc'"$query"')' > count.xq
44 echo 'let $doc := collection("'"$doc"'") return $doc'"$query" > mat.xq
49 OUTPUT=`$QIZX -g /raid0/kn/qizxlib/ -l xmark count.xq 2>&1`
50 if echo "$OUTPUT" | grep -q 'java' >/dev/null 2>&1
66 tmp=`echo "$count" | grep -o '[0-9.]\+'`
67 if [ "$tmp" = "$count" ]
77 OUTPUT=`$QIZX -g /raid0/kn/qizxlib/ -l xmark -r "$repeat" count.xq 2>&1`
78 if echo "$OUTPUT" | grep -q 'java' >/dev/null 2>&1
90 } < <(echo "$OUTPUT" | grep 'display time' | cut -f 3 -d : | grep -o '[0-9]\+'| tail -n +1 | average )
95 if [ -z "$time_count" ]
99 tmp=`echo "$time_count" | grep -o '[0-9.]\+'`
100 if [ "$tmp" = "$time_count" ]
109 OUTPUT=`$QIZX -g /raid0/kn/qizxlib/ -l xmark -r "$repeat" mat.xq -out /dev/null 2>&1`
110 if echo "$OUTPUT" | grep -q 'java' >/dev/null 2>&1
122 } < <(echo "$OUTPUT" 2>&1 | grep 'display time' | cut -f 3 -d : | grep -o '[0-9]\+'| tail -n +1 | average)
126 if [ -z "$time_mat" ]
132 tmp=`echo "$time_mat" | grep -o '[0-9.]\+'`
133 if [ "$tmp" = "$time_mat" ]
146 #UGLY HACK TO TRICK QIZX EVALUATION VERSION
147 # OLD_DATE=`date +"%m/%d/%Y"`
149 # function reset_time() {
150 # CUR_TIME=`date +"%H:%M:%S"`
151 # sudo date -s "$OLD_DATE $CUR_TIME" >/dev/null 2>&1
153 # trap reset_time INT TERM
155 #CUR_TIME=`date +"%H:%M:%S"`
156 #sudo date -s "03/11/2011 $CUR_TIME" >/dev/null 2>&1