Hi, folks.  Just as a note, I saw several q ev's in the script and
scriptlets.  The event for a client can complete even if the backup
failed/stopped in the middle of a filespace.  Have you considered doing
something like a:

select node_name, filespace_name from filepaces where backup_end <
(current_timestamp-(2 days))

or

backup_end < backup_start

or some variation?  This would let you know if a backup fails on a node even
if the client event completed.  It'll also let you know if someone removed
filespaces from the domain or something similar.

Alex Paschal
Storage Administrator
Freightliner, LLC
(503) 745-6850 phone/vmail

-----Original Message-----
From: George Lesho [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 20, 2001 10:15 AM
To: [EMAIL PROTECTED]
Subject: Re: Automated monitoring of backup


I run the following script from cron... Not very subtle but it does provide
almost all the info needed to know what to do first thing in the morning
regarding TSM...  George Lesho AFC Enterprises

note - replace the id and password as they apply at your location:

30 07 * * * /usr/local/bin/tsmreport.scr

The tsmreport.scr file:

#!/bin/ksh
> /tmp/tsminfo
> /tmp/dbstatus
> /tmp/loginfo
> /tmp/tsmtapes

date=$(date +"%d%m%y")
echo "[${date}] TSM Status Report for yesterday" > /tmp/tsminfo
echo "" >> /tmp/tsminfo
echo "
****************************************************************************
*********"

>> /tmp/tsminfo
echo "Active TSM Processes at 7:30 AM! |" >> /tmp/tsminfo
echo "----------------------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q proc |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Number of scratch tapes in the 3575 tape library: |" >> /tmp/tsminfo
echo "---------------------------------------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=query -password=<passwd> -tabd run scratch |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Status of backups done yesterday |" >> /tmp/tsminfo
echo "----------------------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
echo "   Scheduled Start        Actual Start          Schedule    Node
Name" >> /tmp/tsminfo
echo "   ---------------        ------------          --------
---------" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd  q eve \* \* begint=-24 |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Status of drives: |" >> /tmp/tsminfo
echo "-------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q drive |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Status of TSM data base |" >> /tmp/tsminfo
echo "-------------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q db |
/usr/local/bin/cleanhdrs >> /tmp/dbstatus
echo "Available Space in MB=" >> /tmp/tsminfo
cat /tmp/dbstatus | awk '{print $1}' >> /tmp/tsminfo
echo "Assigned capacity in MB=" >> /tmp/tsminfo
cat /tmp/dbstatus | awk '{print $2}' >> /tmp/tsminfo
echo "Maximum Extension in MB=" >> /tmp/tsminfo
cat /tmp/dbstatus | awk '{print $3}' >> /tmp/tsminfo
echo "Maximum reduction in MB=" >> /tmp/tsminfo
cat /tmp/dbstatus | awk '{print $4}' >> /tmp/tsminfo
echo "Page size in bytes=" >> /tmp/tsminfo
cat /tmp/dbstatus | awk '{print $5}' >> /tmp/tsminfo
echo "Total usable pages=" >> /tmp/tsminfo
cat /tmp/dbstatus | awk '{print $6}' >> /tmp/tsminfo
echo "Used pages=" >> /tmp/tsminfo
cat /tmp/dbstatus | awk '{print $7}' >> /tmp/tsminfo
echo "Percent Utilized=" >> /tmp/tsminfo
cat /tmp/dbstatus | awk '{print $8}' >> /tmp/tsminfo
echo "Maximum percentage of Utilization=" >> /tmp/tsminfo
cat /tmp/dbstatus | awk '{print $9}' >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Status of rollfoward TSM log |" >> /tmp/tsminfo
echo "------------------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q log |
/usr/local/bin/cleanhdrs >> /tmp/loginfo
echo "Available space in MB=" >> /tmp/tsminfo
cat /tmp/loginfo | awk '{print $1}' >> /tmp/tsminfo
echo "Assigned capacity in MB=" >> /tmp/tsminfo
cat /tmp/loginfo | awk '{print $2}' >> /tmp/tsminfo
echo "Maximum extension in MB=" >> /tmp/tsminfo
cat /tmp/loginfo | awk '{print $3}' >> /tmp/tsminfo
echo "Maximum reduction in MB=" >> /tmp/tsminfo
cat /tmp/loginfo | awk '{print $4}' >> /tmp/tsminfo
echo "Page size in bytes=" >> /tmp/tsminfo
cat /tmp/loginfo | awk '{print $5}' >> /tmp/tsminfo
echo "Total usable pages=" >> /tmp/tsminfo
cat /tmp/loginfo | awk '{print $6}' >> /tmp/tsminfo
echo "Used pages=" >> /tmp/tsminfo
cat /tmp/loginfo | awk '{print $7}' >> /tmp/tsminfo
echo "Percent utilized=" >> /tmp/tsminfo
cat /tmp/loginfo | awk '{print $8}' >> /tmp/tsminfo
echo "Maximum percent utilized=" >> /tmp/tsminfo
cat /tmp/loginfo | awk '{print $9}' >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Make access to these volumes readwrite |" >> /tmp/tsminfo
echo "----------------------------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd  q vol access=reado
status=filling | /usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Put datactr tape in library |" >> /tmp/tsminfo
echo "----------------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd  q actl begint=-24 search
=\"119 mi nutes\" | /usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Copypool backups complete! |" >> /tmp/tsminfo
echo "----------------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q actl begint=-24 msg=1214 |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Offsite/Unavailable volumes |" >> /tmp/tsminfo
echo "-----------------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q actl begint=-24 msg=1259 |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Write Protect tab on! |" >> /tmp/tsminfo
echo "-----------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q actl begint=-24 msg=8463 |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Shared Memory error |" >> /tmp/tsminfo
echo "---------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q actl begint=-24 msg=8290 |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Space Reclamation Error |" >> /tmp/tsminfo
echo "-------------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q actl begint=-24 msg=1092 |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Write errors; Volume set to READONLY |" >> /tmp/tsminfo
echo "--------------------------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q actl begint=-24 msg=1411 |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Excessive read errors |" >> /tmp/tsminfo
echo "-----------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q actl begint=-24 msg=1218 |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Hardware IO errors |" >> /tmp/tsminfo
echo "--------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q actl begint=-24 msg=8302 |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "Volumes checked in |" >> /tmp/tsminfo
echo "--------------------" >> /tmp/tsminfo
echo "" >> /tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q actl begint=-24 msg=8422 |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo
echo "
----------------------------------------------------------------------------
---------"

>> /tmp/tsminfo
echo "The scheduler daemon probably stopped on the client |" >>
/tmp/tsminfo
echo "-----------------------------------------------------" >>
/tmp/tsminfo
dsmadmc -id=<userid> -password=<passwd> -tabd q actl begint=-24 msg=8214 |
/usr/local/bin/cleanhdrs >> /tmp/tsminfo

cat /tmp/tsminfo | mailx -s "Yesterday's TSM Wrap ${date}"
"[EMAIL PROTECTED]" "[EMAIL PROTECTED]"


The above script calls this script to clean up headers... I received this
script from one of the members of this board and it works very nicely to
clean up the output of a dsmadmc command...

#!/bin/ksh
cat >/tmp/$$.stop <<EOF
SCHEDULE_NAME
ADSTAR Distributed
Tivoli Storage Man
Command Line Admin
(C) Copyright IBM
Session establishe
  Server Version
  Server date/time
ANS8000I Server co
ANR2034E QUERY EVE
ANS8001I Return co
ANS8002I Highest retur
ANS8009E
ANS1217E
ANR0944E
Scheduled Start
Date/Time
<ENTER> to continue
-------------
^$
EOF
cat $1  | grep -vf /tmp/$$.stop
rm /tmp/$$.stop





"Gill, Geoffrey L." <[EMAIL PROTECTED]>@VM.MARIST.EDU> on 07/20/2001
11:12:05 AM

Please respond to "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>

Sent by:  "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:
Fax to:
Subject:  Automated monitoring of backup


To all,

I'm wondering how others are monitoring their nightly backups for
completion. Currently our operations people use the web interface to
monitor
backups. I've been asked to find a way to help work this out so information
is fed somewhere from somewhere automatically. I am not a programmer or dba
so my expertise is limited, actually probably non existent, as it relates
to
making this happen on my own.

Do any of you have some suggestions as to how to make this work? Can you
pass along any scripts that would help me? Would this be done from the TSM
server and sent out or is it possible to run this from one computer by
pulling the data from TSM and sending it to a different computer?

If I have to re-invent the wheel it probably won't come out round.....
Thanks,

Geoff Gill
TSM Administrator
NT Systems Support Engineer
SAIC
E-Mail:   [EMAIL PROTECTED]
Phone:  (858) 826-4062
Pager:   (888) 997-9614

"WorldSecure <Freightliner.com>" made the following
 annotations on 07/20/01 11:28:31
------------------------------------------------------------------------------

[INFO] -- Content Manager:
The information contained in this communication is confidential and intended solely 
for the use of the individual to whom it is addressed and others authorized to receive 
it.  If you are not the intended recipient, any disclosure, copying, distribution or 
taking of any action in reliance on the contents of this information is prohibited. If 
you have received this communication in error, please immediately notify the sender by 
phone if possible or via email message.

==============================================================================

Reply via email to