#!/bin/sh # PCP QA Test No. 544 # testing collectl2pcp metrics extraction (proc indom, in particular) # # Copyright (c) 2013 Red Hat. # 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 "cd $here; rm -rf testarchive.* $tmp.*; exit \$status" 0 1 2 3 15 which collectl2pcp >$seq.full 2>&1 || _notrun collectl2pcp not installed # real QA test starts here C=./collectl TA=testarchive cat > $tmp.general < $tmp.cpus < $tmp.disks < $tmp.nets < $tmp.procs < $tmp.out.general pminfo -f -a $TA `cat $tmp.cpus` | tee -a $seq.full > $tmp.out.cpus pminfo -f -a $TA `cat $tmp.disks` | tee -a $seq.full > $tmp.out.disks pminfo -f -a $TA `cat $tmp.nets` | tee -a $seq.full > $tmp.out.nets pminfo -f -a $TA `cat $tmp.procs` | tee -a $seq.full > $tmp.out.procs SUM="sum -r" [ $PCP_PLATFORM = darwin ] && SUM=sum $SUM $tmp.out.* \ | sed -e 's/[ ][ ]*[0-9]*[ ]/ /' \ | sed -e 's/^00*//' \ | while read chksum path do printf "%05d %s\n" $chksum $path | sed -e "s,$tmp,TMP,g" done echo >> $seq.full } # real QA test starts here echo '## Testing RHEL6.4 inst/value extraction, checksums:' | tee -a $seq.full collectl2pcp -F $C/rhel6.raw.gz $TA checksums echo '## Testing Debian inst/value extraction, checksums:' | tee -a $seq.full collectl2pcp -F $C/debian_sid_detailed.raw.gz $TA checksums # success, all done status=0 exit