pmrep: update TODO, man page
[pcp.git] / qa / 053
blobba8482a4c379003f1b76418cd9cbc72b14d2a3f3
1 #! /bin/sh
2 # PCP QA Test No. 053
3 # Verify the good stuff happens with pmclient
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard filters
12 . ./common.product
13 . ./common.filter
15 _filter()
18 tee -a $seq.full \
19 | $PCP_AWK_PROG '
20 /^Archive: / { print "... title ..."; next }
21 /^[0-9. ]*$/ { print "... " NF " numbers ..."; next }
22 { print }'
25 trap "rm -f $tmp $tmp.*; exit" 0 1 2 3 15
27 rm -f $here/$seq.full
29 # real QA test starts here
30 cat >$tmp.config <<End-of-File
31 log mandatory on once {
32 hinv.ncpu
34 log mandatory on 5 secs {
35 kernel.all.load [ "1 minute", "15 minute" ]
36 kernel.percpu.cpu.user
37 kernel.percpu.cpu.sys
38 mem.freemem
39 disk.all.total
41 End-of-File
42 pmlogger -c $tmp.config -l $tmp.log -s 4 $tmp
43 _filter_pmlogger_log <$tmp.log
44 cat $tmp.log >>$here/$seq.full
46 pmdumplog $tmp >>$here/$seq.full
48 ncpu=`pmprobe -v hinv.ncpu 2>&1 \
49 | $PCP_AWK_PROG '
50 NF == 3 && $2 == 1 { print $3; exit }
51 { print "0"; exit }'`
54 # output is sensitive to SP/MP ... so do the one that is real, and fake
55 # the other
57 if [ "$ncpu" -eq 1 ]
58 then
59 echo "real SP case" >>$here/$seq.full
60 pmclient -a $tmp | _filter
61 echo "..."
62 # fake MP output
63 cat <<End-of-File
64 pmclient: pmFetch: End of PCP archive log
65 ... title ...
66 CPU Busy Busy Free Mem Disk Load Average
67 Util CPU Util (Mbytes) IOPS 1 Min 15 Min
68 ... 7 numbers ...
69 ... 7 numbers ...
70 End-of-File
71 else
72 # fake SP output
73 cat <<End-of-File
74 pmclient: pmFetch: End of PCP archive log
75 ... title ...
76 CPU Free Mem Disk Load Average
77 Util (Mbytes) IOPS 1 Min 15 Min
78 ... 5 numbers ...
79 ... 5 numbers ...
80 End-of-File
81 echo "..."
82 echo "real MP case" >>$here/$seq.full
83 pmclient -a $tmp | _filter