This file is indexed.

/var/lib/pcp/testsuite/827 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
#!/bin/sh
# PCP QA Test No. 827
# Check log rewriting of Linux kernel PMDA metric metadata
#
# Copyright (c) 2013, 2015, 2016 Red Hat.
#

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

seq=`basename $0`

case $PCP_PLATFORM
in
    linux)
	;;
    *)
	# for other platforms, the Linux PMDA logrewrite rules
	# may not be present ...
	#
	for tree in snmp tcp
	do
	    [ -f "$PCP_VAR_DIR/config/pmlogrewrite/linux_proc_net_${tree}_migrate.conf" ] || _notrun "linux_proc_net_${tree}_migrate.conf: pmlogrewrite rules not installed"
	done
	;;
esac

echo "QA output created by $seq"

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

# real QA test starts here
cat >$tmp.config_snmp <<End-of-File
metric 60.14.* { type -> U32 }
End-of-File

cat >$tmp.config_tcp <<End-of-File
metric network.tcp.rtoalgorithm { sem -> COUNTER units -> 0,0,1,0,0,1 }
metric network.tcp.rtomin { sem -> COUNTER units -> 0,0,1,0,0,1 }
metric network.tcp.rtomax { sem -> COUNTER units -> 0,0,1,0,0,1 }
metric network.tcp.maxconn { sem -> COUNTER units -> 0,0,1,0,0,1 }
metric network.tcp.currestab { sem -> COUNTER units -> 0,0,1,0,0,1 }
End-of-File

for tree in snmp tcp
do
    echo
    echo "=== checking Linux kernel $tree metric rewriting ==="
    echo

    pmlogrewrite -c $tmp.config_$tree -w archives/new_$tree $tmp.old
    pmlogrewrite -c $PCP_VAR_DIR/config/pmlogrewrite/linux_proc_net_${tree}_migrate.conf -w $tmp.old $tmp.new

    pmdumplog -z -dilmst $tmp.old >$tmp.old.dump
    pmdumplog -z -dilmst $tmp.new >$tmp.new.dump
    pmdumplog -z -dilmst archives/new_$tree >$tmp.ref.dump

    echo "old -> new changes"
    diff -u $tmp.old.dump $tmp.new.dump | sed -e '/^---/d' -e '/^+++/d'

    # Note:
    # 	Turns out pmlogrewrite and pmlogger don't quite agree on when
    # 	to update the temporal index for the prologue record, so there
    # 	may be a small diff here in the metadata offset in the temporal
    # 	index ... the differences have been analyzed and are believed to
    # 	be benign.
    #
    echo
    echo "new -> ref changes ... expect at most, metadata offset change for temporal index"
    diff -u $tmp.ref.dump $tmp.new.dump | sed -e '/^---/d' -e '/^+++/d'

    rm $tmp.old.* $tmp.new.* $tmp.ref.*
done

# success, all done
status=0
exit