#!/bin/sh # PCP QA Test No. 525 # Units from summary botched after avg_host added to metric declaration. # # From a report by Jun Wang, junwang123@gmail.com # # Copyright (c) 2013 Ken McDonell. All Rights Reserved. # seq=`basename $0` echo "QA output created by $seq" # get standard environment, filters and checks . ./common.product . ./common.filter . ./common.check status=1 # failure is the default! $sudo rm -rf $tmp.* $seq.full trap "_cleanup; exit \$status" 0 1 2 3 15 # check if summary PMDA already installed # eval `pmprobe summary 2>&1 | awk ' BEGIN { sts = "false" } $2 > 0 { sts = "true"; exit } END { print "reinstall=" sts }'` _cleanup() { cd $PCP_VAR_DIR/pmdas/summary for file in pmns expr.pmie help do [ -f $file.$seq ] && $sudo mv $file.$seq $file done if $reinstall then $sudo ./Install >$here/$seq.full 2>&1 else $sudo ./Remove >>$here/$seq.full 2>&1 fi cd $here rm -rf $tmp.* } cat >$tmp.pmns <$tmp.expr.pmie < 0; summary.qa.t04 = all_inst sample.long.bin_ctr > 0; summary.qa.t05 = min_inst sample.long.bin_ctr; summary.qa.t06 = max_inst sample.long.bin_ctr; End-of-File echo >$tmp.help cd $PCP_VAR_DIR/pmdas/summary for file in pmns expr.pmie help do $sudo mv $file $file.$seq $sudo mv $tmp.$file $file done $sudo ./Install >$here/$seq.full cat $PCP_LOG_DIR/pmcd/summary.log >>$here/$seq.full echo >>$here/$seq.full echo "--- pmie directly ---" >>$here/$seq.full pmie -v -t 1 -T +2 -c expr.pmie >>$here/$seq.full 2>&1 # success, all done status=0 exit