File: 1046

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 (84 lines) | stat: -rwxr-xr-x 1,832 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#! /bin/sh
# PCP QA Test No. 1046 (formerly 527)
# exercise pmieconf global parameters
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc.  All Rights Reserved.
#

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

# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check

which pmieconf >/dev/null 2>&1 || _notrun "No pmieconf binary installed"

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

_filter()
{
    $PCP_AWK_PROG '/delta = ([0-9]+)/ { print $(NF-2), $(NF-1), $NF }'
}

# real QA test starts here
cat > $tmp.pmie <<EOF
// pmieconf-pmie 1 ./pconf
// end
EOF

echo
echo "=== first, set global delta"
pmieconf -r ./pconf -f $tmp.pmie m global delta 120
head -3 $tmp.pmie

echo
echo "=== now change cpu groups delta"
pmieconf -r ./pconf -f $tmp.pmie modify cpu delta 450
head -9 $tmp.pmie

echo
echo "=== now print out some deltas"
echo o  global
pmieconf -r ./pconf -f $tmp.pmie l global | _filter
echo o  memory
pmieconf -r ./pconf -f $tmp.pmie l memory | _filter
echo o  cpu
pmieconf -r ./pconf -f $tmp.pmie l cpu | _filter

echo
echo "=== change global again"
pmieconf -r ./pconf -f $tmp.pmie m global delta 60
head -9 $tmp.pmie

echo
echo "=== print out the deltas"
echo o  global
pmieconf -r ./pconf -f $tmp.pmie l global | _filter
echo o  memory
pmieconf -r ./pconf -f $tmp.pmie l memory | _filter
echo o  cpu
pmieconf -r ./pconf -f $tmp.pmie l cpu | _filter

echo
echo "=== lconf is in $seq.full ==="
echo
cp $tmp.pmie $seq_full

# debug check ... someone's clobbering pconf
#
if `which git >/dev/null 2>&1`
then
    if git config --get remote.origin.url >/dev/null
    then
	# assume we're in a git repository, but may be older version of
	# git (so -s does not work)
	git status | grep pconf
    fi
fi

# success, all done
status=0
exit