This file is indexed.

/var/lib/pcp/testsuite/159 is in pcp-testsuite 4.0.1-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#! /bin/sh
# PCP QA Test No. 159
# check out cisco PMDA
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc.  All Rights Reserved.
#

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

# get standard filters
. ./common.product
. ./common.filter
. ./common.check

[ -z "$PCPQA_CISCO_ROUTER" ] && \
_notrun "No cisco router set via \$PCPQA_CISCO_ROUTER in ./common.config"

status=1
signal=$PCP_BINADM_DIR/pmsignal
trap _cleanup 0 1 2 3 15

_cleanup()
{
    pmstore pmcd.control.tracenobuf 0 2>&1 >/dev/null
    _cleanup_agent
    rm -f $tmp.*
    exit $status
}

_cleanup_agent()
{
    cd $home/$iam

    [ -f $configfile.$seq ] && _restore_config $configfile

    if grep $iam $tmp.pmcd.conf > /dev/null
    then
	$sudo ./Install < /dev/null > /dev/null 2>&1
    else
	$sudo ./Remove < /dev/null > /dev/null 2>&1
    fi

    _restore_config $PCP_PMCDCONF_PATH
    $sudo $signal -a -s HUP pmcd

    cd $here
}

_filter_ins()
{
    sed -e '/^Check/{
s/ 1 warnings, / /
s/ [0-9][0-9]* values/ SOME values/
}' \
	-e 's/.* \(hash table entries\)/  NNN \1/' \
	-e 's/.* \(non-leaf nodes\)/  NNN \1/' \
	-e 's/.* \(leaf nodes\)/  NNN \1/' \
	-e 's/.* \(bytes of symbol table\)/  NNN \1/' \
	-e '/make: Nothing to be done for/d' \
| $PCP_AWK_PROG '
	/currently unselected interfaces/  { interfaces=1; print; next }
        interfaces==1 { print "<interfaces>\n"; interfaces=0; next }
	{ print }'
}

# real QA test starts here
home=$PCP_PMDAS_DIR
iam=cisco
configdir=$PCP_VAR_DIR/config/$iam
configfile=$configdir/$iam.conf
tmp_configfile=/tmp/$iam.conf
if [ ! -d $home/$iam ]
then
    echo "Where is $home/$iam?"
    exit 1
fi
cd $home/$iam
unset ROOT MAKEFLAGS

if [ -f Makefile ]
then
    if $sudo $PCP_MAKE_PROG clobber 2>&1 >$tmp.out
    then
	:
    else
	cat $tmp.out
	echo "Arrgh, make clobber failed"
	exit 1
    fi
fi

# copy the pmcd config file to restore state later
_save_config $PCP_PMCDCONF_PATH

# copy the agent config file to restore state later
[ -f $configfile ] && _save_config $configfile

echo
echo "=== remove agent ==="
$PCP_BINADM_DIR/pmpost "start watching for qa/159"
pmstore pmcd.control.tracenobuf 1>/dev/null 2>&1
$sudo ./Remove \
| sed -e 's/not found in Name Space, this is OK/done/'

if pminfo -v cisco
then
    echo "... failed!"
    if [ -d $PCP_LOG_DIR/pmcd ]
    then
	cat $PCP_LOG_DIR/pmcd/pmcd.log
    else
	cat $PCP_LOG_DIR/pmcd.log
    fi
    echo
    tail $PCP_LOG_DIR/NOTICES
fi
pmstore pmcd.control.tracenobuf 0 1>/dev/null 2>&1
$PCP_BINADM_DIR/pmpost "end watching for qa/159"

cat <<End-of-File >$tmp.in
$PCPQA_CISCO_ROUTER

End-of-File
echo >>$tmp.in
cat <<End-of-File >>$tmp.in
s2/3
e1/0
quit
$PCPQA_CISCO_ROUTER

End-of-File
echo >>$tmp.in
cat <<End-of-File >>$tmp.in
s2/0
quit

End-of-File

echo
echo "=== install agent ==="
$sudo ./Install <$tmp.in >$tmp.out 2>&1
_filter_ins <$tmp.out
pminfo -v `pminfo cisco | grep -v bytes_out_bcast` || echo "... failed!"

echo
echo "=== re-install agent ==="
$sudo ./Install <$tmp.in >$tmp.out 2>&1
_filter_ins <$tmp.out
pminfo -v `pminfo cisco | grep -v bytes_out_bcast` || echo "... failed!"

status=0
exit