Drop unused condition check
[pcp.git] / qa / 981
blob7283d0f11a5a8b1bc5a360413e5aa02d1c81d692
1 #!/bin/sh
2 # PCP QA Test No. 981
3 # Test gpfs pmda
5 # Copyright (c) 2015 Martins Innus. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 [ -d $PCP_PMDAS_DIR/gpfs ] || _notrun "gpfs PMDA directory is not installed"
18 status=1
19 perl -e "use PCP::PMDA" >/dev/null 2>&1
20 [ $? -eq 0 ] || _notrun "perl PCP::PMDA module not installed"
22 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
24 _filter()
26 sed \
27 -e "s;$PCP_PMDAS_DIR;\$PCP_PMDAS_DIR;" \
28 -e "s;$script;pmdagpfs.pl;" \
29 | _filter_dumpresult
32 # real QA test starts here
33 domain=135
34 script=pmdagpfs.pl
35 cd "$PCP_PMDAS_DIR/gpfs"
37 # create a root namespace file for dbpmda to use
38 export GPFS_MMPMON_CMD="cat $here/gpfs/mmpmon_fsios.txt"
39 PCP_PERL_PMNS=root /usr/bin/env perl $script > $tmp.root
41 # create a set of commands for dbpmda
42 cat >$tmp.cmds <<End-of-File
43 open pipe /usr/bin/env perl $script
44 getdesc on
45 desc gpfs.fsios.cluster
46 desc gpfs.fsios.filesystem
47 desc gpfs.fsios.read_bytes
48 fetch gpfs.fsios.cluster
49 fetch gpfs.fsios.filesystem
50 fetch gpfs.fsios.read_bytes
51 instance $domain.0
52 End-of-File
54 # iterate over our pre-canned gpfs files
55 echo === Testing precanned gpfs files
56 $sudo TERM=ansi dbpmda -n $tmp.root -ie < $tmp.cmds 2>&1 | _filter
58 status=0
59 exit