
#!/bin/sh
# File	: ontap_post-check.sh
# By	: Maarten.deBoer@Atos.net, 140905
# Subject	: Script do a post-check after ontap upgrade and compare with pre-post-check
PGM="`basename $0|cut -d\. -f1`"
VER="0.1"
TMP="/tmp/${PGM}.$$"
DATADIR="${HOME}/data/out"
MAILTO="maarten.deboer@atos.net"
LOG="${HOME}/log/${PGM}.log"
SSH="/usr/bin/ssh -n"
DATI="`date +%Y-%m-%d_%H%M%S`"

FILERS="nlnaf83 nlnaf84 nlnaf85 nlnaf86"

touch ${TMP}
echo "`date` ${PGM} v${VER} started."|tee -a ${LOG}

for FILER in $FILERS
do
  echo "${FILER} ..."
  cp /dev/null ${TMP}
  ${SSH} ${FILER} cf status >> ${TMP}
  ${SSH} ${FILER} version >> ${TMP}
  ${SSH} ${FILER} storage show disk -p >> ${TMP}
  ${SSH} ${FILER} aggr status >> ${TMP}
  ${SSH} ${FILER} ifconfig -a >> ${TMP}
  ${SSH} ${FILER} vfiler status -a >> ${TMP}
  ${SSH} ${FILER} snapmirror on >> ${TMP}
  ${SSH} ${FILER} sysconfig >> ${TMP}

  diff ${TMP} ${DATADIR}/pre-post-check_${FILER}.asc
done  # FILERS


rm ${TMP}
echo "`date` ${PGM} finished."|tee -a ${LOG}
exit 0

