3 # testing collectl2pcp functionality
5 # Copyright (c) 2013 Red Hat, Inc. All Rights Reserved.
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 pmiostat
>$seq.full
2>&1 || _notrun pmiostat not installed
21 which collectl2pcp
>$seq.full
2>&1 || _notrun collectl2pcp not installed
26 # real QA test starts here
28 echo '## Testing host mismatch in headers'
29 collectl2pcp
-F $C/some_host.raw
$C/wrong_host.raw
$TA 2>&1
31 echo '## Testing no archive overwrite'
32 collectl2pcp
$C/some_host.raw
$TA
34 echo '## Testing archive overwrite with F flag'
35 collectl2pcp
-F $C/some_host.raw
$TA
37 echo '## Testing correct temporal order of header timestamps'
38 collectl2pcp
-F $C/some_host.raw
$C/some_host_later.raw
$TA
40 echo '## Testing incorrect temporal order of header timestamps'
41 collectl2pcp
-F $C/some_host_later.raw
$C/some_host.raw
$TA
43 echo '## Testing timezone in archive label'
44 collectl2pcp
-F $C/some_host.raw
$TA
45 pmdumplog
-L $TA |
grep timezone
46 awk '$6 == "TZ:" {print "collectl header timezone", $7}' $C/some_host.raw
48 echo '## Testing RHEL64 conversion'
49 collectl2pcp
-F $C/rhel6.raw.gz
$TA
51 echo '## Testing Debian (sid) conversion, defaults'
52 collectl2pcp
-F $C/debian_sid_defaults.raw.gz
$TA
54 echo '## Testing load average metric values'
55 pmval
-z -f 2 -t 10 -a $TA kernel.all.load
57 echo '## Testing Debian (sid) conversion, detailed'
58 collectl2pcp
-F $C/debian_sid_detailed.raw.gz
$TA
60 echo '## Testing network interface instance domain'
61 pmprobe
-I -a $TA network.interface.
in.bytes
63 echo '## Testing some hinv metrics'
64 collectl2pcp
-F $C/some_host.raw
$TA
65 pminfo
-a $TA -f hinv.ncpu hinv.ndisk
67 echo '## Testing handling of corrupted or truncated metric values'
68 collectl2pcp
-F $C/truncated.raw
$TA 2>&1
70 echo '## Testing per-CPU metrics'
71 collectl2pcp
-F $C/some_host.raw
$TA
72 pmval
-z -r -t 10 -a $TA kernel.percpu.cpu.user
'[cpu0]'
73 awk '/cpu0/ {print "cpu0 raw msec value", $2 * 1000 / 100}' $C/some_host.raw
75 echo '## Testing pmiostat with disk.dev metrics'
78 echo '## Testing pmiostat with deice-mapper metrics'
79 pmiostat
-t 10 -a $TA -x dm