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 = darwin
]
21 ln $seq.out
.4 $seq.out
25 if pmprobe filesys.
readonly >/dev
/null
27 ln $seq.out
.3 $seq.out
29 ln $seq.out
.1 $seq.out
33 status
=1 # failure is the default
34 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
37 # real QA test starts here
38 root
=`df / | $PCP_AWK_PROG 'NR == 2 { print $1 }'`
39 echo "root=$root" >>$seq.full
42 echo "Arrgh, cannot get device for root fs from df(1) ..."
48 if which realpath
>/dev
/null
2>&1
50 symroot
=`realpath $root`
52 symroot
=`ls -l $root | sed -e 's/.*-> //'`
55 echo "Arrgh, cannot get symlink for device for root fs ..."
62 # handle case like ...
63 # /dev/disk/by-uuid/467793a8-5191-4940-90fb-38a6f28b035d -> ../../sda1
70 dir
=`echo $dir | sed -e 's@/[^/]*$@@'`
71 symroot
=`echo $symroot | sed -e 's@\.\./\([^.]\)@\1@'`
74 symroot
=${dir}/${symroot}
85 echo "symroot=$symroot" >>$seq.full
87 |
egrep "(^filesys)|\"$root\"|/dev/root|$symroot\"" \
88 | _filter_dumpresult
2>&1 > $tmp.out