3 # Exercise slow_python PMDA connect_pmcd() method - Python variant
4 # [see also qa/763 for the Perl version]
6 # Copyright (c) 2014 Ken McDonell. All Rights Reserved.
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
19 if pmprobe
-I pmcd.agent.status |
grep '"slow_python"' >/dev
/null
21 cd $here/pmdas
/slow_python
22 $sudo .
/Remove
>>$here/$seq.full
2>&1
23 $sudo rm -f domain.h.python
28 status
=1 # failure is the default!
29 $sudo rm -rf $tmp.
* $seq.full
30 trap "cd $here; rm -rf $tmp.*; _cleanup; exit \$status" 0 1 2 3 15
32 python
-c 'from pcp import pmda' 2>/dev
/null
33 test $?
-eq 0 || _notrun
'Python pcp pmda module is not installed'
36 $PCP_MAKE_PROG clean
>>$here/$seq.full
2>&1
38 # real QA test starts here
41 echo |
tee -a $here/$seq.full
45 echo "=== no start delay ===" |
tee -a $here/$seq.full
48 echo "=== start delay `expr \( -1 \) \* $start` sec, no connect_pmcd() ===" |
tee -a $here/$seq.full
51 echo "=== start delay $start sec, using connect_pmcd() ===" |
tee -a $here/$seq.full
54 date >>$here/$seq.full
55 cat <<End-of-File | $sudo ./Install
59 date >>$here/$seq.full
60 pminfo
-f slow_python |
tee -a $here/$seq.full
61 $sudo cat $PCP_LOG_DIR/pmcd
/slow_python.log
>>$here/$seq.full
62 $sudo tail -40 $PCP_LOG_DIR/pmcd
/pmcd.log
>>$here/$seq.full