Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 1051
blob0569c5cf5f9884d47f14107f6cb5bd55e0be8ea8
1 #! /bin/sh
2 # PCP QA Test No. 1051 (formerly 582)
3 # pmieconf dumps core
5 # Copyright (c) 2015 Red Hat.
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 seq=`basename $0`
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
13 . ./common.product
14 . ./common.filter
15 . ./common.check
17 which pmieconf >/dev/null 2>&1 || _notrun "No pmieconf binary installed"
18 [ -f $PCP_PMDAS_DIR/shping/pmdashping ] || _notrun "shping pmda not installed"
20 rm -f $seq.out
21 case $PCP_PLATFORM
23 linux|darwin|solaris)
24 ln $seq.out.$PCP_PLATFORM $seq.out || exit 1
27 _notrun "Need qualified output for $PCP_PLATFORM"
29 esac
31 status=0 # success is the default!
32 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
34 cat <<End-of-File >$tmp.conf
35 // pmieconf-pmie 1 $PCP_VAR_DIR/config/pmieconf
36 // 0 global delta = "1 min"
37 // 0 global hosts = ""
38 // 1 cpu.excess_fpe enabled = yes
39 // 1 cpu.load_average enabled = yes
40 // 1 cpu.syscall enabled = yes
41 // 1 cpu.system enabled = yes
42 // 1 cpu.util enabled = yes
43 // 1 craylink.node_cb_errs enabled = yes
44 // 1 craylink.router_cb_errs enabled = yes
45 // 1 filesys.buffer_cache enabled = yes
46 // 1 filesys.filling enabled = yes
47 // 1 memory.exhausted enabled = yes
48 // 1 memory.swap_low enabled = yes
49 // 1 network.buffers enabled = yes
50 // 1 network.tcp_drop_connects enabled = yes
51 // 1 network.tcp_retransmit enabled = yes
52 // 1 shping.status enabled = yes
53 // end
55 // --- START GENERATED SECTION (do not change this section) ---
56 // generated by pmieconf on: Wed May 19 10:35:42 1999
59 End-of-File
61 _filter()
63 sed \
64 -e '/not currently available/d' \
65 -e '/Unknown or illegal metric identifier/d' \
66 -e '/not in namespace/d' \
67 -e '/Unknown metric name/d'
70 $sudo rm -f core* $seq.core* $seq.full
72 # real QA test starts here
74 pmieconf -f $tmp.conf m global syslog_prefix '$bogus_macro_name$' 2>&1 \
75 | tee $seq.full \
76 | _filter
78 echo >>$seq.full
79 echo "=== configured rules ===" >>$seq.full
80 cat $tmp.conf >>$seq.full
81 echo >>$seq.full
82 echo "=== pmie output ===" >>$seq.full
84 _check_core
86 if [ $status = 0 ]
87 then
88 pmie -C $tmp.conf 2>&1 \
89 | tee -a $seq.full \
90 | _filter
93 exit