This file is indexed.

/var/lib/pcp/testsuite/270 is in pcp-testsuite 3.9.10.

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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
#! /bin/sh
# PCP QA Test No. 270
# Test `pmlogextract':
#	 1. one input file, one output file, no parameters		- work
#	 2. one input file, one output file, -S, -T and -z parameters	- work
#		(-S and -T are within the archive)
#	 3. one input file, one output file, -S and -z parameters	- work
#		(-S is out of range)
#	 4. one input file, one output file, -T and -z parameters	- work
#		(-T is out of range)
#	 5. one input file, one output file, -t parameter		- work
#	 6. one input file, one output file, -c parameter		- work
#	 7. one input file, one output file, -c, -S, -T & -z parameter	- work
#	 8. one input file, one output file, -S, -T, -w & -z parameter	- work
#
# 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

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

_check_output()
{
    [ $# != 1 ] && return
    prog=$1

    if [ -f $tmp.err ]
    then
	if [ -s $tmp.err ]
	then
	    echo "Warning: $prog reported the following errors:"
	    cat $tmp.err | sed -e 's/tmp\/[0-9]*/tmp\/PID/'
	    echo
	fi
    else
	echo "Warning: cannot find error file \"$tmp.err\"."
    fi
}


# real QA test starts here
echo "Test pmlogextract"


# step 1
rm -rf $tmp.arch*
echo
echo " --- step 1: no flags ---"
echo "(output depends on src/mirage{0,index,meta})"
pmlogextract src/mirage $tmp.arch >$tmp.out 2>$tmp.err
_check_output pmlogextract
pmdumplog -L -z $tmp.arch | sed -e '/^PID/s/: [0-9]*/: PID/'


# step 2
rm -rf $tmp.arch*
echo
echo " --- step 2: test -S, -T and -z flags ---"
echo "(output depends on src/mirage{0,index,meta})"
pmlogextract -S "@10:50:00" -T "@11:00:00" -z src/mirage $tmp.arch >$tmp.out 2>$tmp.err
_check_output pmlogextract
pmdumplog -L -z $tmp.arch | sed -e '/^PID/s/: [0-9]*/: PID/'


# step 3
rm -rf $tmp.arch*
echo
echo " --- step 3: test -S out of range ---"
echo "(output depends on src/mirage{0,index,meta})"
pmlogextract -S "@10:00:00" -z src/mirage $tmp.arch >$tmp.out 2>$tmp.err
_check_output pmlogextract
pmdumplog -L -z $tmp.arch | sed -e '/^PID/s/: [0-9]*/: PID/'


# step 4
rm -rf $tmp.arch*
echo
echo " --- step 4: test -T out of range ---"
echo "(output depends on src/mirage{0,index,meta})"
pmlogextract -T "@12:00:00" -z src/mirage $tmp.arch >$tmp.out 2>$tmp.err
_check_output pmlogextract
pmdumplog -L -z $tmp.arch | sed -e '/^PID/s/: [0-9]*/: PID/'


# this was never implemented correctly .. skip it
## step 5
#rm -rf $tmp.arch*
#echo
#echo " --- step 5: test -t flag ---"
#echo "(output depends on src/mirage{0,index,meta})"
## update interval for "sample.drift" in src/mirage is 1 minute
#pmlogextract -n src/root_irix -t "2min" src/mirage $tmp.arch >$tmp.out 2>$tmp.err1
#cat $tmp.err1 \
#	| sed -e '/^Description unavailable/d' \
#	| sed -e '/^Reason:/d' \
#	| sed -e '/^Warning \[/d' > $tmp.err
#_check_output pmlogextract
#pmdumplog -m -z $tmp.arch sample.drift | sed -e '/^$/d'

# step 6
rm -rf $tmp.arch*
rm -rf $tmp.config
echo
echo " --- step 6: test config file ---"
echo "(output depends on src/mirage{0,index,meta})"
# src/mirage contains "sample.bin", "sample.drift", & "sample.mirage"
cat >$tmp.config <<'End-of-file'
#
# pmlogextract config file
#
sample.bin ["bin-300" "bin-700" "bin-100"]		# out of order
sample.drift
sample.mirage ["m-00" "m-13" "m-17" "m-24"]		# in order
End-of-file
    
pmlogextract -c $tmp.config src/mirage $tmp.arch >$tmp.out 2>$tmp.err
_check_output pmlogextract
# dump descriptors
echo
echo "--- dump descriptors ---"
pmdumplog -d -z $tmp.arch | sed -e '/^$/d'

# dump instance domain
echo
echo "--- dump instance domain ---"
pmdumplog -i -z $tmp.arch | sed -e '/^$/d'

# dump values for sample.bin
echo
echo "--- dump values for sample.bin ---"
pmdumplog -m -z $tmp.arch sample.bin | sed -e '/^$/d'

# dump values for sample.drift
echo
echo "--- dump values for sample.drift ---"
pmdumplog -m -z $tmp.arch sample.drift | sed -e '/^$/d'

# dump values for sample.mirage
echo
echo "--- dump values for sample.mirage ---"
pmdumplog -m -z $tmp.arch sample.mirage | sed -e '/^$/d'


# step 7
rm -rf $tmp.arch*
rm -rf $tmp.config
echo
echo " --- step 7: test config file, plus -S, -T and -z flags ---"
echo "(output depends on src/mirage{0,index,meta})"
# src/mirage contains "sample.drift"
cat >$tmp.config <<'End-of-file'
#
# pmlogextract config file
#
sample.drift
End-of-file

pmlogextract -c $tmp.config -S "@10:50:00" -T "@11:00:00" -z src/mirage $tmp.arch >$tmp.out 2>$tmp.err
_check_output pmlogextract

# dump values for sample.drift
echo "--- dump values for sample.drift ---"
pmdumplog -m -z src/mirage sample.drift \
	| sed -e '/^$/d' \
	| $PCP_AWK_PROG -F":" '{ if ($1 == 10 && $2 >= 50) print $0; }' > $tmp.m
pmdumplog -m -z $tmp.arch sample.drift \
	| sed -e '/^$/d' \
	| grep -v "timezone set to local" > $tmp.a
diff $tmp.m $tmp.a
x=$?
if [ $x = 0 ]
then
    echo "sample.drift the same ... good"
else
    echo "sample.drift different ... BAD"
fi


# step 8
rm -rf $tmp.arch*
rm -rf $tmp.config
echo
echo " --- step 8: test -w flag (with -S, -T and -z) ---"
echo "(output depends on src/rattle{0,index,meta})"
# src/rattle contains "irix.kernel.all.load"

pmlogextract -S "@00:00:00" -T "@12:00:00" -w -z src/rattle $tmp.arch >$tmp.out 2>$tmp.err
_check_output pmlogextract

# dump values for irix.kernel.all.load
echo "--- dump values for irix.kernel.all.load ---"
pmdumplog -m -z src/rattle irix.kernel.all.load \
	| sed -e '/^$/d' \
	| $PCP_AWK_PROG -F":" '{ if ($1 >= 0 && $1 < 12) print $0; }' > $tmp.m
pmdumplog -m -z $tmp.arch irix.kernel.all.load \
	| sed -e '/^$/d' \
	| grep -v "timezone set to local" > $tmp.a
diff $tmp.m $tmp.a
x=$?
if [ $x = 0 ]
then
    echo "irix.kernel.all.load the same ... good"
else
    echo "irix.kernel.all.load different ... BAD"
fi


# success, all done
status=0
exit