#! /bin/sh ### - Gets the status of the last backup attempt. echo "\nBackup Status -- Report any status other than completed!\n\n" > /home/norlmop/daily.out date >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q event * * begind=-1 begint=17:00 endd=today" | grep Completed | tr -s " " | cut -d " " -f5,7 >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q event * * begind=-1 begint=17:00 endd=today" | grep Missed | tr -s " " | cut -d " " -f3,5 >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q event * * begind=-1 begint=17:00 endd=today" | grep Failed | tr -s " " | cut -d " " -f5,7 >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q event * * begind=-1 begint=17:00 endd=today" | grep Started | tr -s " " | cut -d " " -f5,7 >> /home/norlmop/daily.out ### - Counts the number of scratch tapes. echo "\n\nNumber of Scratch Tapes -- Report less than 25\n\n" >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q libv" | grep Scratch | wc -l >> /home/norlmop/daily.out ### - Counts the number of DRMEDIA (mountable) echo "\n\nNumber of DRMEDIA Tapes\n\n" >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q drmedia wherestate=mountable" | wc -l >> /home/norlmop/daily.out >> /home/norlmop/daily.out ### - Does a query on the database. echo "\n\nDatabase Status -- Report Pct Util > 80%\n\n" >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q db" | grep 4,096 | tr -s " " | cut -d " " -f9 >> /home/norlmop/daily.out " -f9 >> /home/norlmop/daily.out ### - Does a query on the log. echo "\n\nLog Status -- Report Pct Util > 80%\n\n" >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q log" | grep 4,096 | tr -s " " | cut -d " " -f9 >> /home/norlmop/daily.out ### - Lists the database volumes. echo "\n\nThese are today's Database Volumes: \n\n" >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q volhist type=dbb" | grep 3590 | tr -s " " | cut -d " " -f8 >> /home/norlmop/daily.out " | cut -d " " -f8 >> /home/norlmop/daily.out ### - Lists the DRMedia volumes. echo "\n\nHere is the DRMedia for the day \n\n" >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q drmedia wherestate=mountable" | grep Mountable | tr -s " " | cut -d " " -f1 >> /home/norlmop/daily.out ### - Lists tapes that are marked Read Only. echo "\n\nThe following tapes have been marked Read Only\n\n" >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q vol access=reado" | grep TAPEPOOL | tr -s " " | cut -d " " -f1 >> /home/norlmop/daily.out ### - Lists tapes marked unavailable. ### - Lists tapes marked unavailable. echo "\n\nThe following tapes have been marked Unavailable \n\n" >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q vol access=unav" | grep TAPEPOOL | tr -s " " | cut -d " " -f1 >> /home/norlmop/daily.out ### - Queries the status of the drives. ### - Queries the status of the drives. echo "\n\nDrive status -- Report any errors and call ADSM or IBM Hardware support.\n\nNode Backup Archive HSM Total\n" >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q drive" | grep rmt | tr -s " " | cut -d " " -f1-5 >> /home/norlmop/daily.out ### - Gathers the storage per server. echo "\n\nHere is the storage info for the spreadsheet\n\n" >> /home/norlmop/daily.out echo "\nNode Backup Archive HSM Total\n" >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q auditoccupancy" | grep ES | cut -c1-10,39-51,59-66,81-84,86-96 >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q auditoccupancy" | grep NOR | cut dsmadmc -id=admin -password=admin "q auditoccupancy" | grep NOR | cut -c1-10,39-51,59-66,81-84,86-96 >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q auditoccupancy" | grep POWER | cut dsmadmc -id=admin -password=admin "q auditoccupancy" | grep POWER | cut -c1-10,39-51,59-66,81-84,86-96 >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q auditoccupancy" | grep ORIGIN | dsmadmc -id=admin -password=admin "q auditoccupancy" | grep ORIGIN | cut -c1-10,39-51,59-66,81-84,86-96 >> /home/norlmop/daily.out dsmadmc -id=admin -password=admin "q auditoccupancy" | grep AS1 | cut dsmadmc -id=admin -password=admin "q auditoccupancy" | grep AS1 | cut -c1-10,39-51,59-66,81-84,86-96 >> /home/norlmop/daily.out ### - Check the DRM disk to ensure it copied the DRM plan. ### - Check the DRM disk to ensure it copied the DRM plan. #echo "Here is a directory list of the DRM list. It should contain the last 3 days\nworth of reports. Report any time there are no files for the present and\nprevious days." >> /home/norlmop/daily.out # #rsh adsm tar -tvf /dev/fd0 >> /home/norlmop/daily.out ### - Mails the report date | mailx -s "ADSM report!" -r "adsm@`hostname`.nor.texaco.com" norlmop@es5 < /home/norlmop/daily.out ------=_NextPart_000_0034_01BF4107.75EB61C0-- __________________________________________________ __________________________________________________ Do You Yahoo!? Thousands of Stores. Millions of Products. All in one place. Yahoo! Shopping: http://shopping.yahoo.com