summaryrefslogtreecommitdiff
path: root/qa/298
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-10-26 12:33:50 +0400
commit47e6e7c84f008a53061e661f31ae96629bc694ef (patch)
tree648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/298
downloadpcp-47e6e7c84f008a53061e661f31ae96629bc694ef.tar.gz
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/298')
-rwxr-xr-xqa/29895
1 files changed, 95 insertions, 0 deletions
diff --git a/qa/298 b/qa/298
new file mode 100755
index 0000000..6f4da88
--- /dev/null
+++ b/qa/298
@@ -0,0 +1,95 @@
+#! /bin/sh
+# PCP QA Test No. 298
+# exercise pmie2col
+#
+# Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved.
+#
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+# get standard environment, filters and checks
+. ./common.product
+. ./common.filter
+. ./common.check
+
+rm -f $seq.out $seq.full
+if [ $PCP_PLATFORM = darwin ]
+then
+ ln $seq.out.2 $seq.out
+else
+ ln $seq.out.1 $seq.out
+fi
+
+status=0 # success is the default!
+$sudo rm -rf $tmp.*
+trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+
+cat <<'End-of-File' >$tmp.config
+loadav = kernel.all.load #'1 minute';
+'%usr' = kernel.all.cpu.user;
+'%sys' = kernel.all.cpu.sys;
+'%wio' = kernel.all.cpu.wait.total;
+'%idle' = kernel.all.cpu.idle;
+'maxiops' = max_inst(disk.dev.total);
+End-of-File
+
+_filter()
+{
+ sed \
+ -e 's/^[A-Z][a-z][a-z] [A-Z][a-z][a-z] *[0-9][0-9]* [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [0-9][0-9][0-9][0-9] /DATE /' \
+ -e 's/ *[0-9][0-9.]*/ N/g'
+}
+
+_filter_err()
+{
+ sed \
+ -e '/not in namespace/s/for host .*/for host LOCALHOST/'
+}
+
+# real QA test starts here
+echo "=== live ===" | tee -a $seq.full
+pmie -v -t 1 -T 3 <$tmp.config >$tmp.out 2>$tmp.tmp
+cat $tmp.out >>$seq.full
+sed -e '/Info: evaluator exiting/d' <$tmp.tmp >$tmp.err
+if [ -s $tmp.err ]
+then
+ echo "pmie errors ..."
+ _filter_err <$tmp.err
+fi
+cat $tmp.out \
+| pmie2col \
+| tee -a $seq.full \
+| _filter
+
+echo | tee -a $seq.full
+echo "=== live, pmie -e ===" | tee -a $seq.full
+pmie -v -e -t 1 -T 3 <$tmp.config >$tmp.out 2>$tmp.tmp
+cat $tmp.out >>$seq.full
+sed -e '/Info: evaluator exiting/d' <$tmp.tmp >$tmp.err
+if [ -s $tmp.err ]
+then
+ echo "pmie errors ..."
+ _filter_err <$tmp.err
+fi
+cat $tmp.out \
+| pmie2col \
+| tee -a $seq.full \
+| _filter
+
+echo | tee -a $seq.full
+echo "=== archive and pmie2col -w ===" | tee -a $seq.full
+pmie -v -z -A 30m -t 30m -a src/kenj-pc-1 <$tmp.config >$tmp.out 2>$tmp.tmp
+cat $tmp.out >>$seq.full
+sed -e '/Info: evaluator exiting/d' <$tmp.tmp >$tmp.err
+if [ -s $tmp.err ]
+then
+ echo "pmie errors ..."
+ _filter_err <$tmp.err
+fi
+cat $tmp.out \
+| pmie2col -w 8 \
+| tee -a $seq.full
+
+# success, all done
+exit