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/1051 | |
download | pcp-debian.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/1051')
-rwxr-xr-x | qa/1051 | 91 |
1 files changed, 91 insertions, 0 deletions
@@ -0,0 +1,91 @@ +#! /bin/sh +# PCP QA Test No. 1051 (formerly 582) +# pmieconf dumps core +# +# 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" + +rm -f $seq.out +case $PCP_PLATFORM +in + irix|linux|darwin|solaris) + ln $seq.out.$PCP_PLATFORM $seq.out || exit 1 + ;; + *) + _notrun "Need qualified output for $PCP_PLATFORM" + ;; +esac + +status=0 # success is the default! +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 + +cat <<End-of-File >$tmp.conf +// pmieconf-pmie 1 $PCP_VAR_DIR/config/pmieconf +// 0 global delta = "1 min" +// 0 global hosts = "" +// 1 cpu.excess_fpe enabled = yes +// 1 cpu.load_average enabled = yes +// 1 cpu.syscall enabled = yes +// 1 cpu.system enabled = yes +// 1 cpu.util enabled = yes +// 1 craylink.node_cb_errs enabled = yes +// 1 craylink.router_cb_errs enabled = yes +// 1 filesys.buffer_cache enabled = yes +// 1 filesys.filling enabled = yes +// 1 memory.exhausted enabled = yes +// 1 memory.swap_low enabled = yes +// 1 network.buffers enabled = yes +// 1 network.tcp_drop_connects enabled = yes +// 1 network.tcp_retransmit enabled = yes +// 1 shping.status enabled = yes +// end +// +// --- START GENERATED SECTION (do not change this section) --- +// generated by pmieconf on: Wed May 19 10:35:42 1999 +// + +End-of-File + +_filter() +{ + sed \ + -e '/not currently available/d' \ + -e '/Unknown or illegal metric identifier/d' \ + -e '/not in namespace/d' \ + -e '/Unknown metric name/d' +} + +$sudo rm -f core* $seq.core* $seq.full + +# real QA test starts here + +pmieconf -f $tmp.conf m global syslog_prefix '$bogus_macro_name$' 2>&1 \ +| tee $seq.full \ +| _filter + +echo >>$seq.full +echo "=== configured rules ===" >>$seq.full +cat $tmp.conf >>$seq.full +echo >>$seq.full +echo "=== pmie output ===" >>$seq.full + +_check_core + +if [ $status = 0 ] +then + pmie -C $tmp.conf 2>&1 \ + | tee -a $seq.full \ + | _filter +fi + +exit |