File: 558

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 (105 lines) | stat: -rwxr-xr-x 2,820 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#! /bin/sh
# PCP QA Test No. 558
# pmie problems where metrics initially available and later become
# unavailable
#
# 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

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

$sudo rm -f core
DEBUG="-v -Dappl1,appl2"
DEBUG=
HOST=`hostname`

target="-h $HOST"

PMCD_RECONNECT_TIMEOUT=1; export PMCD_RECONNECT_TIMEOUT

# real QA test starts here

cat <<End-of-File | pmie $target -t 1sec $DEBUG >$tmp.log 2>&1 &
sample.long.million > hinv.ncpu
    -> print 5 sec "singular" " %v";
sample.float.million + sample.double.million >= sample.long.million
    -> print 5 sec "expr" " %v";
some_host sample.long.million > hinv.ncpu
    -> print 5 sec "some_host" " %h:%v";
some_inst sample.bin + sample.bin > 1000
    -> print 5 sec "some_inst" " [%i]%v";
some_host
    some_inst
	sample.bin :localhost :'$HOST'
	+ sample.bin  :localhost :'$HOST'
	> 1000
    -> print 5 sec "some_host some_inst" " %h:[%i]%v";
End-of-File

sleep 3
if ! _service pmlogger stop 2>&1; then _exit 1; fi \
| _filter_pcp_stop
_wait_pmlogger_end || _exit 1
if ! _service pmcd stop 2>&1; then _exit 1; fi \
| _filter_pcp_stop
_wait_pmcd_end || _exit 1

sleep 10
if ! _service pmcd start 2>&1; then _exit 1; fi \
| _filter_pcp_start
_wait_for_pmcd || _exit 1
if ! _service pmlogger start 2>&1; then _exit 1; fi \
| _filter_pcp_start
_wait_for_pmlogger || _exit 1
sleep 12
$signal -s TERM $!
wait
_wait_for_pmlogger || _exit 1

cp $tmp.log $seq_full

# Especially on slow VMs (like bozo-vm) we may need to dodge warnings
# from pmie's rule scheduler around pmcd reconnection ... the second
# last awk script does this.
#
_filter_pmie_log <$tmp.log \
| sed \
    -e "s/ host $HOST/ host HOST\/localhost/g" \
    -e "s/ from $HOST/ from HOST\/localhost/g" \
    -e "s/$HOST/HOST/g" \
    -e "s/local:/HOST/g" \
    -e "s/ host localhost/ host HOST\/localhost/g" \
    -e "s/ from localhost/ from HOST\/localhost/g" \
    -e 's/failed: IPC protocol failure/failed: [IPC shutdown]/' \
    -e 's/failed: Connection reset by peer/failed: [IPC shutdown]/' \
| $PCP_AWK_PROG '
skip == 1 && /^[^ ]/		{ skip = 0 }
/^run: schedule eval/		{ skip = 1 }
/^sleepTight: negative/		{ skip = 1 }
/^Last sleepTight until:/	{ skip = 1 }
/^This sleepTight\() entry:/	{ skip = 1 }
/^Harvest children done:/	{ skip = 1 }
/^Want sleepTight until:/	{ skip = 1 }
/Task dump @/			{ skip = 1 }
skip == 0			{ print }' \
| $PCP_AWK_PROG '
$1 == "DATE:" && $2 == "singular"	{ if (state > 0) skip = 1
					  state++
					}
$1 != "DATE:"		{ skip = 0; state = 0 }
skip == 0		{ print }' \


_check_core

exit