3 # pmlogconf metric accessibility
5 # Copyright (c) 2010 Ken McDonell. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 # see if unix domain sockets are available (permissions)
19 $unix_domain_sockets && target
="-h unix:"
21 status
=0 # success is the default!
22 $sudo rm -rf $tmp.
* $seq.full
23 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
27 if [ $PCP_PLATFORM != solaris
]
32 -e '/^disk.dev.avactive .* Unknown metric name/d' \
33 -e '/^network.icmp.* Unknown metric name/d' \
34 -e '/^network.igmp.* Unknown metric name/d' \
35 -e '/^network.ip.* Unknown metric name/d' \
36 -e '/^network.tcp.* Unknown metric name/d' \
37 -e '/^network.udp.* Unknown metric name/d' \
38 -e '/^filesys.* Unknown metric name/d' \
39 -e '/^swap .* Unknown metric name/d' \
40 -e '/^swap.pages.* Unknown metric name/d' \
41 -e '/^swapdev .* Unknown metric name/d' \
48 if [ $PCP_PLATFORM != darwin
]
53 -e '/^disk\.dev\.avactive .* Unknown metric name/d' \
54 -e '/^disk\.all\.avactive .* Unknown metric name/d' \
55 -e '/^disk\.partitions\..* Unknown metric name/d' \
56 -e '/^hinv\.nnode .* Unknown metric name/d' \
57 -e '/^network\.icmp .* Unknown metric name/d' \
58 -e '/^network\.igmp .* Unknown metric name/d' \
59 -e '/^network\.ip .* Unknown metric name/d' \
60 -e '/^network\.tcp .* Unknown metric name/d' \
61 -e '/^network\.udp .* Unknown metric name/d' \
62 -e '/^network\.udplite .* Unknown metric name/d' \
63 -e '/^swap .* Unknown metric name/d' \
64 -e '/^swap\..* .* Unknown metric name/d' \
65 -e '/^swapdev .* Unknown metric name/d' \
66 -e '/^proc\..* Unknown metric name/d' \
67 -e '/^kernel\.all\.intr .* Unknown metric name/d' \
68 -e '/^kernel\.all\.nusers .* Unknown metric name/d' \
69 -e '/^kernel\.all\.pswitch .* Unknown metric name/d' \
70 -e '/^mem\.util\.bufmem .* Unknown metric name/d' \
71 -e '/^mem\.util\.cached .* Unknown metric name/d' \
78 # pcp-atop uses metrics not supported on some kernels
79 if [ $PCP_PLATFORM != linux
]
84 -e '/^network.softnet.* Metric not supported/d' \
85 -e '/^proc.namespaces.* Metric not supported/d' \
90 # remove all known platform-dependencies from output
91 # (ideally leaving any genuine failures behind)
95 # these are always-on in older oss versions of pcp
97 -e '/^disk.dev.avg_disk.active .* metric name/d' \
98 -e '/^disk.all.avg_disk.active .* metric name/d' \
99 -e '/^disk.dev.bytes .* Unknown metric name/d' \
100 -e '/^disk.all.bytes .* Unknown metric name/d' \
101 -e '/^network.igmp .* Unknown metric name/d' \
102 -e '/^nfs.* Unknown metric name/d' \
103 -e '/^rpc.* Unknown metric name/d' \
104 -e '/^nfsclient.* Unknown metric name/d' \
105 -e '/^elasticsearch.search.all.* Metric not supported/d' \
106 -e '/^oracle.* Information not currently available/d' \
107 -e '/^swap.in .* Metric not supported/d' \
108 -e '/^swap.out .* Metric not supported/d' \
109 | _filter_linux | _filter_solaris | _filter_darwin
112 # real QA test starts here
113 pmlogconf
$tmp.conf
>$tmp.out
2>&1
114 cat $tmp.out
>$seq.full
116 sed -e 's/:n:/:y:/' <$tmp.conf
>$tmp.tmp
117 mv $tmp.tmp
$tmp.conf
119 yes '' | pmlogconf
$tmp.conf
>$tmp.out
120 ( echo && echo "== TMP.OUT" ) >>$seq.full
121 cat $tmp.out
>>$seq.full
122 ( echo && echo "== TMP.CONF") >>$seq.full
123 cat $tmp.conf
>>$seq.full
124 ( echo && echo "== FILTERED") >>$seq.full
133 | LC_COLLATE
=POSIX
sort \
136 |
xargs pmprobe
$target \
142 echo Silence is golden