diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
commit | 47e6e7c84f008a53061e661f31ae96629bc694ef (patch) | |
tree | 648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/1046 | |
download | pcp-debian.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/1046')
-rwxr-xr-x | qa/1046 | 73 |
1 files changed, 73 insertions, 0 deletions
@@ -0,0 +1,73 @@ +#! /bin/sh +# PCP QA Test No. 1046 (formerly 527) +# exercise pmieconf global parameters +# +# Copyright (c) 1995-2002 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 + +which pmieconf >/dev/null 2>&1 || _notrun "No pmieconf binary installed" + +status=1 # failure is the default! +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 + +_filter() +{ + $PCP_AWK_PROG '/delta = ([0-9]+)/ { print $(NF-2), $(NF-1), $NF }' +} + +# real QA test starts here +cat > $tmp.pmie <<EOF +// pmieconf-pmie 1 ./pconf +// end +EOF + +echo +echo "=== first, set global delta" +pmieconf -r ./pconf -f $tmp.pmie m global delta 120 +head -3 $tmp.pmie + +echo +echo "=== now change cpu groups delta" +pmieconf -r ./pconf -f $tmp.pmie modify cpu delta 450 +head -9 $tmp.pmie + +echo +echo "=== now print out some deltas" +# note use fgrep in case of bogus double delta +echo o global +pmieconf -r ./pconf -f $tmp.pmie l global | _filter +echo o memory +pmieconf -r ./pconf -f $tmp.pmie l memory | _filter +echo o cpu +pmieconf -r ./pconf -f $tmp.pmie l cpu | _filter + +echo +echo "=== change global again" +pmieconf -r ./pconf -f $tmp.pmie m global delta 60 +head -9 $tmp.pmie + +echo +echo "=== print out the deltas" +echo o global +pmieconf -r ./pconf -f $tmp.pmie l global | _filter +echo o memory +pmieconf -r ./pconf -f $tmp.pmie l memory | _filter +echo o cpu +pmieconf -r ./pconf -f $tmp.pmie l cpu | _filter + +echo +echo "=== lconf is in $seq.full ===" +echo +cp $tmp.pmie $seq.full + +# success, all done +status=0 +exit |