File: //var/opt/OV/bin/instrumentation/fs.sh
# Nombre del programa: fs.sh
# Version: 1.1
# Funcion: Identificar potenciales causas en la utilizacion elevada de FS para Unix/Linux
# Parametro 1 = FS
fs_name=$1; shift
os=`uname`
if [ "$os" = "AIX" ]
then
OPCMSG=/usr/lpp/OV/bin/opcmsg
OPCMON=/usr/lpp/OV/bin/OpC/opcmon
else
OPCMSG=/opt/OV/bin/OpC/opcmsg
OPCMON=/opt/OV/bin/OpC/opcmon
fi
echo
echo "# Space util by $fs_name"
echo
df -h $fs_name
echo
echo "# Files modified in the last 24 hours and the size > 10 MB in $fs_name"
echo
find $fs_name -size +10240000c -mtime -1 -type f -exec /bin/ls -axlh {} \; | sort -k 5,5 -n
echo
echo "# Directory with more than 100 MB in $fs_name"
echo
for dir_name in $( find $fs_name/* -type d -prune )
do
for fs_size in `du -sk $dir_name |awk '{ print $1}'`
do
if [ $fs_size -gt 102400 ]
then
fs_size=`echo "$fs_size/ 1024" | bc`
echo 'Folder Name:' $dir_name $'\t\t\t' 'Size:' $fs_size'_MB'
fi
done
done
exit 0