
#!/bin/sh
# File  : dfm_host_set.sh
# By    : MaartenDeBoer.nl, 100611
# Subject       : Set DFM host options

PGM="`basename $0|cut -d\. -f1`"
TMP="/tmp/${PGM}.$$"
LOG="$HOME/log/${PGM}.log"
FILERS="$HOME/etc/filers"

for FILER in `cat ${FILERS}|grep -v \^#|sort`
do
  echo "${FILER}:" | tee -a ${LOG}
  /usr/bin/dfm host set ${FILER} cpuTooBusyThreshold=70
  /usr/bin/dfm host set ${FILER} cpuBusyThresholdInterval=00:01:00

  /usr/bin/ssh ${FILER} vfiler status|grep running|grep -v vfiler|awk '{print $1}'| while read VFILER
  do
    echo "${FILER}/${VFILER}:" | tee -a ${LOG}
    /usr/bin/dfm host set ${VFILER} cpuTooBusyThreshold=70
    /usr/bin/dfm host set ${vFILER} cpuBusyThresholdInterval=00:01:00
  done



done
exit

