getHPFileMount.sh 1.22 KB
LANG=en_US.utf8
export LANG
FILEPATH='/dev/vg00/lvol3'

uname -a > /ibnms/agent/masteragent/result_temp/hpFileMountResult
echo "*******************************************************************************************#" >> /ibnms/agent/masteragent/result_temp/hpFileMountResult

i=1
while((1==1))
do
    tempPath=`mount|sed -n "$i"p|awk '{print $1}'`
    if [ "$tempPath" != "" ]
    then
        i=$(($i+1))
        if [ "$tempPath" != "/" ] && [ "$tempPath" != "/dev/odm" ]
        then

            echo $tempPath>> /ibnms/agent/masteragent/result_temp/hpFileMountResult

            ff -s $FILEPATH|grep -c ^.$tempPath>> /ibnms/agent/masteragent/result_temp/hpFileMountResult

            bdf|grep -c $tempPath >> /ibnms/agent/masteragent/result_temp/hpFileMountResult

            ls -la $tempPath |sed -n 1p |awk '{print $2}'>> /ibnms/agent/masteragent/result_temp/hpFileMountResult
        fi
    else
        break
    fi
done
echo "*******************************************************************************************#" >> /ibnms/agent/masteragent/result_temp/hpFileMountResult


mv /ibnms/agent/masteragent/result_temp/hpFileMountResult /ibnms/agent/masteragent/result/
chmod 777 /ibnms/agent/masteragent/result/hpFileMountResult