I'm looking to modify this existing script:
#!/bin/ksh
FILESYSTEMS="/ /usr /var /prod /arch_nb"
for FILESYSTEM in $FILESYSTEMS
do
FREESPACE=$(df -Pk ${FILESYSTEM} | awk '$4 ~ /[0-9]+/{print $4}')
echo "${FILESYSTEM} free space: ${FREESPACE}" \
done
...to tell me the amount of free space (in Mb) for each filesystem, and them total it for the whole LPAR. Anyone?
#!/bin/ksh
FILESYSTEMS="/ /usr /var /prod /arch_nb"
for FILESYSTEM in $FILESYSTEMS
do
FREESPACE=$(df -Pk ${FILESYSTEM} | awk '$4 ~ /[0-9]+/{print $4}')
echo "${FILESYSTEM} free space: ${FREESPACE}" \
done
...to tell me the amount of free space (in Mb) for each filesystem, and them total it for the whole LPAR. Anyone?