3 # testing collectl2pcp metrics extraction (proc indom, in particular)
5 # Copyright (c) 2013 Red Hat.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 status
=1 # failure is the default!
17 $sudo rm -rf $tmp.
* $seq.full
18 trap "cd $here; rm -rf testarchive.* $tmp.*; exit \$status" 0 1 2 3 15
20 which collectl2pcp
>$seq.full
2>&1 || _notrun collectl2pcp not installed
22 # real QA test starts here
27 cat > $tmp.general
<<End-of-General
42 kernel.all.cpu.irq.hard
43 kernel.all.cpu.irq.soft
46 kernel.all.cpu.wait.total
66 mem.util.corrupthardware
71 mem.util.hugepagesFree
72 mem.util.hugepagesRsvd
73 mem.util.hugepagesSurp
74 mem.util.hugepagesTotal
76 mem.util.inactive_anon
77 mem.util.inactive_file
85 mem.util.slabReclaimable
86 mem.util.slabUnreclaimable
97 cat > $tmp.cpus
<<End-of-CPUs
98 kernel.percpu.cpu.guest
99 kernel.percpu.cpu.idle
100 kernel.percpu.cpu.intr
101 kernel.percpu.cpu.irq.hard
102 kernel.percpu.cpu.irq.soft
103 kernel.percpu.cpu.nice
104 kernel.percpu.cpu.steal
105 kernel.percpu.cpu.sys
106 kernel.percpu.cpu.user
107 kernel.percpu.cpu.wait.total
110 cat > $tmp.disks
<<End-of-Disks
111 network.interface.in.bytes
112 network.interface.in.packets
113 network.interface.out.bytes
114 network.interface.out.packets
117 cat > $tmp.nets
<<End-of-Nets
118 network.interface.in.bytes
119 network.interface.in.packets
120 network.interface.out.bytes
121 network.interface.out.packets
124 cat > $tmp.procs
<<End-of-Procs
131 $sudo rm -f $tmp.out.
*
133 pminfo
-f -a $TA `cat $tmp.general` |
tee -a $seq.full
> $tmp.out.general
134 pminfo
-f -a $TA `cat $tmp.cpus` |
tee -a $seq.full
> $tmp.out.cpus
135 pminfo
-f -a $TA `cat $tmp.disks` |
tee -a $seq.full
> $tmp.out.disks
136 pminfo
-f -a $TA `cat $tmp.nets` |
tee -a $seq.full
> $tmp.out.nets
137 pminfo
-f -a $TA `cat $tmp.procs` |
tee -a $seq.full
> $tmp.out.procs
140 [ $PCP_PLATFORM = darwin
] && SUM
=sum
142 |
sed -e 's/[ ][ ]*[0-9]*[ ]/ /' \
143 |
sed -e 's/^00*//' \
144 |
while read chksum path
146 printf "%05d %s\n" $chksum $path |
sed -e "s,$tmp,TMP,g"
151 # real QA test starts here
153 echo '## Testing RHEL6.4 inst/value extraction, checksums:' |
tee -a $seq.full
154 collectl2pcp
-F $C/rhel6.raw.gz
$TA
157 echo '## Testing Debian inst/value extraction, checksums:' |
tee -a $seq.full
158 collectl2pcp
-F $C/debian_sid_detailed.raw.gz
$TA