This file is indexed.

/var/lib/pcp/testsuite/168 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. 168
# pmlogmerge shall abort if descriptors non consistent across archives
# pv 933456
#
# Copyright (c) 2005 Silicon Graphics, Inc.  All Rights Reserved.
#

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

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

_cleanup()
{
    _service pcp stop >/dev/null 2>&1
    _service pcp start >/dev/null 2>&1
    _wait_for_pmcd
    _wait_for_pmlogger
    rm -f $tmp.*
}

status=0	# success is the default!
$sudo rm -rf $tmp.*
trap "_cleanup; exit \$status" 0 1 2 3 15

# force sample PMDA back to a sane state
_reset()
{
    _service pmcd stop >/dev/null 2>&1
    _service pmcd start >/dev/null 2>&1
    _wait_for_pmcd
    _wait_for_pmlogger
}

_filter()
{
    sed -e "s;$tmp;TMP;g"
}

# create second archive and try to merge 'em
_doit()
{
    rm -f $tmp.new.* $tmp.out
    echo "log mandatory on 1sec { sample.dynamic.meta }" \
    | pmlogger -l $tmp.log -s 3 $tmp.new
    pmlogextract $tmp.base $tmp.new $tmp.out 2>&1 \
    | _filter
    if [ -f $tmp.out.0 ]
    then
	echo "Oops ... should not have created an output archive!"
	echo
	echo "=== Original metadata ==="
	pminfo -d -a $tmp.base sample.dynamic.meta.metric
	echo
	echo "=== New metadata ==="
	pminfo -d -a $tmp.new sample.dynamic.meta.metric
	echo
	echo "=== Merged metadata ==="
	pminfo -d -a $tmp.out sample.dynamic.meta.metric
	echo
	echo "=== Dump of output archive ==="
	pmdumplog -dilmst $tmp.out
    fi
}

_reset

echo "Check initial metric set up ..."
pminfo -f sample.dynamic.meta

echo "log mandatory on 1sec { sample.dynamic.meta }" \
| pmlogger -l $tmp.log -s 3 $tmp.base

# real QA test starts here

echo "Change metric type ..."
pmstore sample.dynamic.meta.pmdesc.type 3
_doit
pmstore sample.dynamic.meta.pmdesc.type 0

echo "Change metric indom ..."
pmstore sample.dynamic.meta.pmdesc.indom 42
_doit
pmstore sample.dynamic.meta.pmdesc.indom 4294967295

echo "Change metric semantics ..."
pmstore sample.dynamic.meta.pmdesc.sem 0
_doit
pmstore sample.dynamic.meta.pmdesc.sem 4

echo "Change metric units ..."
pmstore sample.dynamic.meta.pmdesc.units 0
_doit
pmstore sample.dynamic.meta.pmdesc.units 520105984

# success, all done
exit