2 # PCP QA Test No. 1049 (formerly 552)
3 # make sure that installed pmie rule files are syntactically OK.
5 # Copyright (c) 2015 Red Hat.
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
17 [ -f $PCP_PMDAS_DIR/shping
/pmdashping
] || _notrun
"shping pmda not installed"
18 [ -f $PCP_PMDAS_DIR/cisco
/pmdacisco
] || _notrun
"cisco pmda not installed"
19 [ -f $PCP_PMDAS_DIR/dm
/pmdadm
] || _notrun
"dm pmda not installed"
20 which pmieconf
>/dev
/null
2>&1 || _notrun
"No pmieconf binary installed"
22 status
=1 # failure is the default!
24 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
26 # Some metrics unavailable by default, so skip the associated rules
29 modify all enabled yes
30 modify shping enabled no
31 modify cisco enabled no
32 modify dmthin enabled no
35 # real QA test starts here
36 echo "running pmieconf with default rules..."
37 ( cat $tmp.cmd
; echo quit
) | pmieconf
-f $tmp.eek
40 echo "running pmie..."
42 id pcp
>/dev
/null
2>&1 && pmieargs
="$pmieargs -U $username"
43 pmie
$pmieargs -c $tmp.eek
-l $tmp.pmielog
45 echo "pmie log file..."
46 cat $tmp.pmielog | _filter_pmie_log
48 echo "--- pmieconf input ---" >$seq.full
49 cat $tmp.cmd
>>$seq.full
50 echo "--- pmie input ---" >>$seq.full
51 cat $tmp.eek
>>$seq.full
52 echo "--- pmie output ---" >>$seq.full
53 cat $tmp.pmielog
>>$seq.full