3 # pmcd agent table relocation and libpcp_pmda botch for PMDA_INTERFACE_3.
4 # linux PMDA returns no values after weblog Install was the original
7 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
11 echo "QA output created by $seq"
13 # get standard environment, filters and checks
18 [ -d $PCP_PMDAS_DIR/sample
] || _notrun
"sample PMDA directory is not installed"
19 [ -d $PCP_PMDAS_DIR/simple
] || _notrun
"simple PMDA directory is not installed"
20 [ -d $PCP_PMDAS_DIR/trivial
] || _notrun
"trivial PMDA directory is not installed"
22 pmcdconf
=$PCP_PMCDCONF_PATH
23 rootconf
=$PCP_VAR_DIR/pmns
/root
26 unset ROOT TOOLROOT MAKEFLAGS
32 [ -f $tmp.pmcd.bak
] && $sudo cp $tmp.pmcd.bak
$pmcdconf
33 [ -f $tmp.root.bak
] && $sudo cp $tmp.root.bak
$rootconf
34 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
43 -e '/In function .vpmprintf./d' \
44 -e '/warning: the use of .tempnam./d' \
45 -e '/make: Nothing to be done/d'
48 status
=1 # failure is the default!
49 trap "_cleanup; exit \$status" 0 1 2 3 15
51 # create a basic pmcd config file
52 if [ $PCP_PLATFORM = linux
-o $PCP_PLATFORM = solaris
]
54 cat >$tmp.pmcd.conf
<< EOF
56 pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.so
58 elif [ $PCP_PLATFORM = darwin
]
60 cat >$tmp.pmcd.conf
<< EOF
62 pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.dylib
65 echo "Arrgh ... need pmcd.conf for $PCP_PLATFORM"
70 cat <<End-of-File >$tmp.pmns
94 # real QA test starts here
95 cp $pmcdconf $tmp.pmcd.bak
96 cp $rootconf $tmp.root.bak
99 $sudo cp $tmp.pmcd.conf
$pmcdconf
100 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
102 for pmda
in '' sample trivial simple
107 echo "=== $pmda PMDA ==="
108 cd $PCP_PMDAS_DIR/$pmda
109 $sudo .
/Install
</dev
/null
>/dev
/null
2> $tmp.stderr
110 # strip blank lines from stderr
111 # strip cc warning messages (assumed to be 4 non-blanks long)
112 cat $tmp.stderr | _filter_make | \
117 /^cc-.*cc: WARNING/ {
118 getline ; getline ; getline ; getline
126 pmstore
-n $tmp.pmns sample.string.write_me
"$pmda"
127 pminfo
-n $tmp.pmns
-f \
129 sample.string.write_me \
133 mask == 1 { if ($1 == "value") $2 = "NUMBER"
137 /pmcd.numagents/ && "'"$pmda"'" == "" { mask = 1 }
138 /trivial.time$/ { mask = 1 }'