This file is indexed.

/var/lib/pcp/testsuite/777 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
#!/bin/sh
# PCP QA Test No. 777
# instant() for derived metrics
#
# Copyright (c) 2015 Ken McDonell.  All Rights Reserved.
#

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

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

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

cat <<End-of-File >$tmp.config
qa.instant.milliseconds = instant(sample.milliseconds)
qa.instant.ulong.bin_ctr = instant(sample.ulong.bin_ctr)
qa.instant.lights = instant(sample.lights)
qa.instant.dynamic.discrete = instant(sample.dynamic.discrete)
qa.instant.drift = instant(sampledso.drift)
qa.instant.pmlogger.port = instant(pmcd.pmlogger.port)
End-of-File

# real QA test starts here
export PCP_DERIVED_CONFIG=$tmp.config
pmprobe -v qa.instant.milliseconds sample.milliseconds >$tmp.out
cat $tmp.out >>$here/$seq.full
# expect 3rd value to be the same in these two lines of output ...
# qa.instant.milliseconds 1 91065894.656
# sample.milliseconds 1 91065894.656
#
$PCP_AWK_PROG <$tmp.out '
NR == 1	{ t = $3 }
NR == 2 { if (t == $3) print "OK"
	  else print "qa.instant.milliseconds",t,"!= sample.milliseconds",$3
	}'

echo
echo "=== metadata ==="
pminfo -d \
    sample.milliseconds qa.instant.milliseconds \
    sample.ulong.bin_ctr qa.instant.ulong.bin_ctr \
    sample.lights qa.instant.lights \
    sample.dynamic.discrete qa.instant.dynamic.discrete \
    sampledso.drift qa.instant.drift \
    pmcd.pmlogger.port qa.instant.pmlogger.port \

echo
echo "=== pmie tests ==="
cat <<End-of-File >$tmp.pmie
uncooked = sample.ulong.bin_ctr;
cooked = qa.instant.ulong.bin_ctr / 1024;
reverse = rate(qa.instant.milliseconds) == sample.milliseconds;
reverse2 = all_inst (qa.instant.dynamic.discrete == sample.dynamic.discrete);
reverse3 = qa.instant.drift == sampledso.drift;
End-of-File

pmie -v -c $tmp.pmie -t 1sec -T 3sec 2>&1 \
| sed -e '/ Info: evaluator exiting/d'

echo
echo "=== archive tests ==="
cat <<End-of-File >$tmp.pmie
raw = sample.milliseconds;
cooked = qa.instant.milliseconds;
reverse = rate(qa.instant.milliseconds) == sample.milliseconds;
reverse4 = qa.instant.pmlogger.port == pmcd.pmlogger.port;
End-of-File
pmie -v -z -c $tmp.pmie -t 10sec -A 10sec -a archives/sample-secs 2>&1 \
| sed -e '/ Info: evaluator exiting/d'

echo
pmval -z -t 15sec -A 15sec -a archives/951127.23.01_v2 sample.lights
pmval -z -t 15sec -A 15sec -a archives/951127.23.01_v2 qa.instant.lights

# success, all done
status=0

exit