File: 536

package info (click to toggle)
pcp 7.0.5-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 252,916 kB
  • sloc: ansic: 1,478,844; sh: 177,285; xml: 160,462; cpp: 83,809; python: 24,349; perl: 18,303; yacc: 6,877; lex: 2,864; makefile: 2,694; awk: 165; fortran: 60; java: 52
file content (84 lines) | stat: -rwxr-xr-x 2,404 bytes parent folder | download
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
#!/bin/sh
# PCP QA Test No. 536
# testing collectl2pcp functionality
#
# Copyright (c) 2013 Red Hat, 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

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

which pmiostat >$seq_full 2>&1 || _notrun pmiostat not installed
which collectl2pcp >$seq_full 2>&1 || _notrun collectl2pcp not installed

C=./collectl
TA=testarchive

# real QA test starts here

echo '## Testing host mismatch in headers'
collectl2pcp -F $C/some_host.raw $C/wrong_host.raw $TA 2>&1

echo '## Testing no archive overwrite'
collectl2pcp $C/some_host.raw $TA

echo '## Testing archive overwrite with F flag'
collectl2pcp -F $C/some_host.raw $TA

echo '## Testing correct temporal order of header timestamps'
collectl2pcp -F $C/some_host.raw $C/some_host_later.raw $TA

echo '## Testing incorrect temporal order of header timestamps'
collectl2pcp -F $C/some_host_later.raw $C/some_host.raw $TA

echo '## Testing timezone in archive label'
collectl2pcp -F $C/some_host.raw $TA
pmdumplog -L $TA | grep timezone
awk '$6 == "TZ:" {print "collectl header timezone", $7}' $C/some_host.raw

echo '## Testing RHEL64 conversion'
collectl2pcp -F $C/rhel6.raw.gz $TA

echo '## Testing Debian (sid) conversion, defaults'
collectl2pcp -F $C/debian_sid_defaults.raw.gz $TA

echo '## Testing load average metric values'
pmval -z -f 2 -t 10 -a $TA kernel.all.load

echo '## Testing Debian (sid) conversion, detailed'
collectl2pcp -F $C/debian_sid_detailed.raw.gz $TA

echo '## Testing network interface instance domain'
pmprobe -I -a $TA network.interface.in.bytes

echo '## Testing some hinv metrics'
collectl2pcp -F $C/some_host.raw $TA
pminfo -a $TA -f hinv.ncpu hinv.ndisk

echo '## Testing handling of corrupted or truncated metric values'
collectl2pcp -F $C/truncated.raw $TA 2>&1
pminfo -a $TA -f kernel.all.load

echo '## Testing per-CPU metrics'
collectl2pcp -F $C/some_host.raw $TA
pmval -z -r -t 10 -a $TA kernel.percpu.cpu.user'[cpu0]'
awk '/cpu0/ {print "cpu0 raw msec value", $2 * 1000 / 100}' $C/some_host.raw

echo '## Testing pmiostat with disk.dev metrics'
pmiostat -t 10 -a $TA

echo '## Testing pmiostat with deice-mapper metrics'
pmiostat -t 10 -a $TA -x dm

# success, all done
status=0

exit