3 # check filesys metrics for root fs
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
16 [ $PCP_PLATFORM = solaris
] && _notrun
"No filesys metrics for Solaris"
19 if [ $PCP_PLATFORM = irix
]
21 ln $seq.out
.2 $seq.out
22 elif [ $PCP_PLATFORM = darwin
]
24 ln $seq.out
.4 $seq.out
28 if [ $PCP_EOE_VER -ge 20300 ]
30 if pmprobe filesys.
readonly >/dev
/null
32 ln $seq.out
.3 $seq.out
34 ln $seq.out
.1 $seq.out
37 ln $seq.out
.0 $seq.out
41 status
=1 # failure is the default
42 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
45 # real QA test starts here
46 root
=`df / | $PCP_AWK_PROG 'NR == 2 { print $1 }'`
47 echo "root=$root" >>$seq.full
50 echo "Arrgh, cannot get device for root fs from df(1) ..."
56 if which realpath
>/dev
/null
2>&1
58 symroot
=`realpath $root`
60 symroot
=`ls -l $root | sed -e 's/.*-> //'`
63 echo "Arrgh, cannot get symlink for device for root fs ..."
70 # handle case like ...
71 # /dev/disk/by-uuid/467793a8-5191-4940-90fb-38a6f28b035d -> ../../sda1
78 dir
=`echo $dir | sed -e 's@/[^/]*$@@'`
79 symroot
=`echo $symroot | sed -e 's@\.\./\([^.]\)@\1@'`
82 symroot
=${dir}/${symroot}
93 echo "symroot=$symroot" >>$seq.full
95 |
egrep "(^filesys)|\"$root\"|/dev/root|$symroot\"" \
96 | _filter_dumpresult
2>&1 > $tmp.out