summaryrefslogtreecommitdiff
path: root/qa/232
diff options
context:
space:
mode:
Diffstat (limited to 'qa/232')
-rwxr-xr-xqa/232103
1 files changed, 103 insertions, 0 deletions
diff --git a/qa/232 b/qa/232
new file mode 100755
index 0000000..3ae8aec
--- /dev/null
+++ b/qa/232
@@ -0,0 +1,103 @@
+#! /bin/sh
+# PCP QA Test No. 232
+# exercise instance API functions for PM_CONTEXT_LOCAL
+#
+# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
+#
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+# get standard filters
+. ./common.product
+. ./common.filter
+
+_filter_dodgey_nfs_indom()
+{
+ sed \
+ -e '/number of instances .* (0) != that for pmGetInDom (18)/d' \
+ -e '/number of instances .* (0) != that for pmGetInDom (22)/d'
+}
+
+status=0
+trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+
+# real QA test starts here
+PMDA_LOCAL_SAMPLE=yes
+export PMDA_LOCAL_SAMPLE
+
+for metric in \
+ kernel.percpu.cpu.idle \
+ disk.dev.read \
+ sampledso.colour \
+ kernel.all.load \
+ network.interface.in.bytes \
+ sampledso.bucket \
+ filesys.used \
+ swapdev.length \
+ nfs.client.reqs \
+ nfs.server.reqs \
+ nfs3.client.reqs \
+ nfs3.server.reqs \
+ sampledso.hordes.one
+do
+ if [ $PCP_PLATFORM = darwin ]
+ then
+ # some of the metrics just aren't there on Mac OS X
+ case $metric
+ in
+ swapdev.length|nfs.client.reqs|nfs.server.reqs)
+ continue
+ ;;
+ esac
+ elif [ $PCP_PLATFORM = solaris ]
+ then
+ # some of the metrics just aren't there on Solaris, or have
+ # equivalents with different names
+ case $metric
+ in
+ swapdev.length|nfs.*|nfs3.*)
+ continue
+ ;;
+ filesys.used)
+ metric=zfs.used.total
+ ;;
+ esac
+ elif [ $PCP_PLATFORM = freebsd ]
+ then
+ # some of the metrics just aren't there on FreeBSD
+ case $metric
+ in
+ filesys.used|swapdev.length|nfs.*|nfs3.*)
+ continue
+ ;;
+ esac
+ fi
+ if [ $PCP_PLATFORM = solaris -o $PCP_PLATFORM = freebsd ]
+ then
+ # need to be root to open /dev/kmem
+ $sudo $here/src/torture_indom $metric >$tmp.out 2>&1
+ status=$?
+ else
+ $here/src/torture_indom $metric >$tmp.out 2>&1
+ status=$?
+ fi
+ sed <$tmp.out \
+ -e '/using .* kmem interface/d' \
+ | _filter_pmcd_log \
+ | _filter_dodgey_nfs_indom
+ if [ $status != 0 ]
+ then
+ case "$metric"
+ in
+ nfs*reqs)
+ ;;
+ *)
+ echo torture_indom failed for $metric
+ ;;
+ esac
+ fi
+done
+
+# all done
+exit