3 # Compare pmdumptext output to pmval
6 echo "QA output created by $seq"
8 status
=1 # failure is the default!
10 trap "_cleanup_qt; exit \$status" 0 1 2 3 15
12 which pmdumptext
>/dev
/null
2>&1 || _notrun
"pmdumptext not installed"
14 date=`pmdumplog -l archives/gap | grep commencing |
15 sed -e 's/ commencing //' -e 's/\.[0-9]*//'`
19 # do nothing, we want to see all of the text if there are differences
25 # -e "s/$date/DATE/g" \
26 # -e "s/^[<>] [0-2][0-9]:[0-5][0-9]:[0-5][0-9]/TIME/"
29 # Note: pmdumptext and pmval can disagree about the timezone when
30 # processing an archive, in the presence of timestamps in the
31 # archive coming from a period of daylight savings, and it not
32 # currently being a period of daylight savings, or vice versa.
33 # This sometimes produces a difference of 1 hour in the reported
34 # time between the tools, hence the HH: filtering here and in
36 # Given the way timezones work for Linux in particular, this
37 # difference cannot be fixed, as the two applications use different
38 # ways of interacting with the PCP timezones support.
42 $PCP_AWK_PROG '{if (NF > 0) print $0}' |
44 -e 's/No values available/?/' \
46 -e 's/.[0-9][0-9][0-9][ ]*/ /' \
48 -e 's/^[012][0-9]:/HH:/' \
57 -e 's/^[012][0-9]:/HH:/' \
58 -e 's/? ? ? ? ? ? ? ? ?/?/'
61 # real QA test starts here
71 echo Raw
$metric >>$seq.full
72 pmval
-t 1 -r -a archives
/gap
$metric 2>&1 | _pmval_filter
> $tmp.pmval
73 pmdumptext
-G -w 16 -t 1 -r -a archives
/gap
-d" " -f "%H:%M:%S" $metric 2>&1 | _pmdumptext_filter
> $tmp.dump
74 diff $tmp.pmval
$tmp.dump | _diff_filter
75 echo "--- pmval ---" >>$seq.full
76 cat $tmp.pmval
>>$seq.full
77 echo "--- pmdumptext ---" >>$seq.full
78 cat $tmp.dump
>>$seq.full
81 echo Rate
$metric >>$seq.full
82 pmval
-t 1 -a archives
/gap
$metric 2>&1 | _pmval_filter
> $tmp.pmval
83 pmdumptext
-G -w 16 -t 1 -a archives
/gap
-d" " -f "%H:%M:%S" $metric 2>&1 | _pmdumptext_filter
> $tmp.dump
84 diff $tmp.pmval
$tmp.dump | _diff_filter
85 echo "--- pmval ---" >>$seq.full
86 cat $tmp.pmval
>>$seq.full
87 echo "--- pmdumptext ---" >>$seq.full
88 cat $tmp.dump
>>$seq.full