File: 843

package info (click to toggle)
pcp 7.1.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 252,748 kB
  • sloc: ansic: 1,483,656; sh: 182,366; xml: 160,462; cpp: 83,813; python: 24,980; perl: 18,327; yacc: 6,877; lex: 2,864; makefile: 2,738; awk: 165; fortran: 60; java: 52
file content (51 lines) | stat: -rwxr-xr-x 1,213 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
# PCP QA Test No. 843
# Exercise memory_python PMDA
#
# Copyright (c) 2014 Red Hat.
#

seq=`basename $0`
echo "QA output created by $seq"

. ./common.python

$python -c "from pcp import pmda" >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "python pcp pmda module not installed"

_cleanup()
{
    if pmprobe -I pmcd.agent.status | grep '"memory_python"' >/dev/null
    then
	cd $here/pmdas/memory_python
	$sudo ./Remove >>$seq_full 2>&1
	$sudo rm -f pmns
	cd $here
    fi
}

status=1	# failure is the default!
trap "cd $here; rm -rf $tmp.*; _cleanup; exit \$status" 0 1 2 3 15

cd pmdas/memory_python
$PCP_MAKE_PROG clean >>$seq_full 2>&1

# real QA test starts here
echo | tee -a $seq_full
date >>$seq_full
$sudo ./Install </dev/null
date >>$seq_full
# Read metrics several times to make sure memory doesn't get corrupted
# when clearing metrics.
pminfo -f memory_python | tee -a $seq_full
pminfo -f memory_python | tee -a $seq_full
pminfo -f memory_python | tee -a $seq_full
pminfo -f memory_python | tee -a $seq_full
pminfo -f memory_python | tee -a $seq_full
$sudo cat $PCP_LOG_DIR/pmcd/memory_python.log >>$seq_full
$sudo tail -40 $PCP_LOG_DIR/pmcd/pmcd.log >>$seq_full

# success, all done
status=0

exit