3 # Compare rpc.server metrics with what nfsstat reports
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
19 echo "TODO: Need to reconcile rpc.server metrics for PCP_PLATFORM $PCP_PLATFORM" >$seq.notrun
20 echo "$seq: [not run] `cat $seq.notrun`"
25 echo checking PCP metric values against
: nfsstat
-rs
27 trap "rm -f $tmp.*; exit" 0 1 2 3 15
28 signal
=$PCP_BINADM_DIR/pmsignal
30 # Don't bother about dupage
31 # Not very popular and has a bug: pv#652216
34 cat > $tmp.workload
<< \EOF
35 ls -R /hosts
/localhost
/usr
>/dev
/null
2>/dev
/null
&
38 $signal -s KILL
$KILL_PID >/dev
/null
2>&1
40 chmod u
+x
$tmp.workload
42 $tmp.workload
>/dev
/null
2>&1
46 # > pminfo -f rpc.server
69 # calls badcalls nullrecv badlen xdrcall duphits dupage
70 # 111220948 0 11687178 0 0 426 6198.58
73 pminfo
-f rpc.server
>$tmp.pminfo
76 # acceptance: abs diff within 10 or diff within 5%
78 cat $tmp.pminfo
$tmp.nfs |
tee $seq.full |
$PCP_AWK_PROG '
80 /Server RPC/ { nfstat=1; next }
81 /rpc.server/ { # pminfo name
83 sub("rpc.server.", "", metric)
86 /value/ { # pminfo value
88 if (metric == "dupage") {
91 pminfo[metric] = value
94 NF>3 && nfstat==1 && /calls/ { # stat names
100 NF>3 && nfstat==1 { # stat values
105 if (! (name in pminfo) ) {
106 print name ": not in pminfo output"
109 pminfo_value = pminfo[name]
110 delta = pminfo_value - stat_value
111 if (delta < 0) delta *= -1
118 if (stat_value == 0) {
121 pct = delta / stat_value
122 ok = (0.95 <= pct && pct <= 1.05)
128 print name ": mismatch, pcp=" pminfo_value " nfsstat=" stat_value
132 for (name in pminfo) {
133 if (! (name in stat_chk) ) {
134 print name ": not in stats output"