
#!/bin/sh
# File  : get_filer_info.sh
# By    : Maarten.DeBoer@Atos.net, 140827
# Subject       : A script to get some info of the Filers
FILERS="filers"
SSH="/usr/bin/ssh -n"

if [ ! -f {$FILERS} ]; then
  echo "  NO filers-file (${FILERS}) found. Exiting ..."
fi

for FILER in `cat ${FILERS}|grep -v \^#`
do
  OUT="${FILER}.asc"
  touch ${OUT}
  ${SSH} ${FILER} 'hostname' | tee -a ${OUT}
  ${SSH} ${FILER} 'version' | tee -a ${OUT}
  ${SSH} ${FILER} 'date' | tee -a ${OUT}
  ${SSH} ${FILER} 'df -Ah' | tee -a ${OUT}
  ${SSH} ${FILER} 'df -h' | tee -a ${OUT}
  ${SSH} ${FILER} 'license' | tee -a ${OUT}
  ${SSH} ${FILER} 'snapmirror status' | tee -a ${OUT}
  ${SSH} ${FILER} 'snapvault status' | tee -a ${OUT}
  ${SSH} ${FILER} 'vfiler status -a' | tee -a ${OUT}
  ${SSH} ${FILER} 'ifconfig -a' | tee -a ${OUT}
  ${SSH} ${FILER} 'options' | tee -a ${OUT}
done  # FILER

exit 0

