#! /bin/sh # PCP QA Test No. 650 # pmlogger configs having PMIDs with multiple metric names # # Copyright (c) 2010 Aconex. 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=0 # success is the default! $sudo rm -rf $tmp.* trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 _filter() { logger_pid=$1 sed \ -e '/Performance metrics from host /s/ host .*/ host .../' \ -e '/commencing/d' \ -e '/ending/d' \ -e '/^\[[0-9]* bytes]/d' \ -e '/value /{ s/value [0-9][0-9]*/value INTEGER/ }' \ -e '/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]/s/[^ ]*/TIMESTAMP/' \ -e "/\"$logger_pid\"/s/$logger_pid/LOGGER_PID/g" \ -e '/pmcd.pmlogger.port/s/value .*/value PORT/' \ -e '/pmcd.pmlogger.host/s/value ".*/value "HOST"/' \ -e '/pmcd.pmlogger.archive/s/value ".*/value "PATH"/' \ | $PCP_AWK_PROG ' $1 == "TIMESTAMP" && NF == 4 { print "TIMESTAMP 0 OFFSET OFFSET"; next } /^InDom: 2.3/ { print; skipi = 1; next } skipi == 1 { print "TIMESTAMP instances"; skipi = 2; next } skipi != 0 && $1 == "InDom:" { skipi = 0 } skipi == 2 { print " ..."; skipi = 3; next } skipi == 3 { next } $1 == "TIMESTAMP" && $2 == "2.4.1" { print; skipv = 1; next } skipv != 0 && NF == 0 { skipv = 0 } skipv == 1 { print " "; skipv = 2; next } skipv == 2 { next } { print }' \ | src/hex2nbo } # real QA test starts here echo "Test case - one metric, remapped ID" rm -f $tmp.log cat <