This file is indexed.

/var/lib/pcp/testsuite/1139 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
#!/bin/sh
# PCP QA Test No. 1139
# Ranking, limit filter, and predicates tests with pmrep.
#
# Copyright (c) 2018 Red Hat.
#

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

. ./common.python

$python -c "from pcp import pmapi" >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "python pcp pmapi module not installed"
$python -c "from collections import OrderedDict" >/dev/null 2>&1
[ $? -eq 0 ] || _notrun "python collections OrderedDict module not installed"

which pmrep >/dev/null 2>&1 || _notrun "pmrep not installed"

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

_msg_filter()
{
    sed \
       -e "s,Recording .* metrics.*,Recording metrics...,g" \
    #end
}

log="--archive $here/archives/rank-pred -z"
out="-o archive -F $tmp.archive"

# real QA test starts here
echo "== test ranking"
pmrep -s  7 $log -p -r -u -J  2 disk.dev.read mem.util.used
pmrep -s  7 $log -p -r -u -J -3 disk.dev.read kernel.pernode.cpu.user

echo "== test limit filtering"
pmrep -s 14 $log -p -r -u -9  5 disk.dev.read disk.dev.write
pmrep -s 14 $log -p -r -u -9 -5 disk.dev.read disk.dev.write

echo "== test predicate"
pmrep -s 14 $log -p -r -u -J  2 -N disk.dev.read disk.dev.read disk.dev.write mem.util.used
pmrep -s 14 $log -p -r -u -J  1 -N disk.dev.read,kernel.pernode.cpu.sys \
  disk.dev.read disk.dev.write mem.util.used kernel.pernode.cpu.user kernel.pernode.cpu.sys

echo "== test predicate with limit filtering"
pmrep -s 14 $log -p -r -u -J  2 -8  10 -N disk.dev.read disk.dev.read disk.dev.write mem.util.used
pmrep -s 14 $log -p -r -u -J  2 -8 -10 -N disk.dev.read disk.dev.read disk.dev.write mem.util.used

echo "== test predicate with limit filtering with dynamic header and predicate values above/below limit"
pmrep -s  4 $log -p -r -u -J  2 -8  50 -N disk.dev.read disk.dev.read disk.dev.write mem.util.used \
  -S @00:00:14 -1
pmrep -s  4 $log -p -r -u -J  2 -8 -50 -N disk.dev.read disk.dev.read disk.dev.write mem.util.used \
  -S @00:00:14 -1

echo "== test instance filter, live filter, invert filter, ranking, predicate"
pmrep -s 14 $log $out -p -r -u                          disk.dev.read disk.dev.write | \
_msg_filter
pmrep -z -a $tmp.archive -p -r -u disk
rm -f $tmp.archive.0 $tmp.archive.index $tmp.archive.meta
pmrep -z -s 14 $log $out -p -r -u -J  2                 disk.dev.read disk.dev.write | \
_msg_filter
pmrep -z -a $tmp.archive -p -r -u disk
rm -f $tmp.archive.0 $tmp.archive.index $tmp.archive.meta
pmrep -z -s 14 $log $out -p -r -u -J  2 -i sda          disk.dev.read disk.dev.write | \
_msg_filter
pmrep -z -a $tmp.archive -p -r -u disk
rm -f $tmp.archive.0 $tmp.archive.index $tmp.archive.meta
pmrep -z -s 14 $log $out -p -r -u -J  2 -i sda -j       disk.dev.read disk.dev.write | \
_msg_filter
pmrep -z -a $tmp.archive -p -r -u disk
rm -f $tmp.archive.0 $tmp.archive.index $tmp.archive.meta
pmrep -z -s 14 $log $out -p -r -u -J  2 -i sda -j -n    disk.dev.read disk.dev.write | \
_msg_filter
pmrep -z -a $tmp.archive -p -r -u disk
rm -f $tmp.archive.0 $tmp.archive.index $tmp.archive.meta
pmrep -z -s 14 $log $out -p -r -u -J  2 -i sda -j -n -N disk.dev.read disk.dev.read disk.dev.write | \
_msg_filter
pmrep -z -a $tmp.archive -p -r -u disk
rm -f $tmp.archive.0 $tmp.archive.index $tmp.archive.meta
pmrep -z -s 14 $log $out -p -r -u -J  2           -n -N disk.dev.read disk.dev.read disk.dev.write | \
_msg_filter
pmrep -z -a $tmp.archive -p -r -u disk
rm -f $tmp.archive.0 $tmp.archive.index $tmp.archive.meta
pmrep -z -s 14 $log $out -p -r -u -J  2              -N disk.dev.read disk.dev.read disk.dev.write | \
_msg_filter
pmrep -z -a $tmp.archive -p -r -u disk
rm -f $tmp.archive.0 $tmp.archive.index $tmp.archive.meta

echo "== overall ranking"
pmrep $log -I -s 12 -r -u   -J 2 -l - -2 disk kernel mem
pmrep $log -I -s  6 -r -t 2 -J 2 -l X -2 disk kernel mem
pmrep $log -I -s 12 -r -u   -J 2 -l - -3 disk mem kernel
pmrep $log -I -s  6 -r -t 2 -J 2 -l X -3 mem disk kernel

# success, all done
status=0
exit