ADSM-L

[ADSM-L] catching the current tsm sched and error logs

2015-04-10 13:14:21
Subject: [ADSM-L] catching the current tsm sched and error logs
From: "Lee, Gary" <glee AT BSU DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 10 Apr 2015 17:12:37 +0000
Trying to work out a way to capture dsmsched.log and dsmerror.log for only the 
most recent scheduled activity.

Tried using a postschedulecmd to submit a job to at but it does not capture the 
activity.
The captured log starts with the messages about log pruning.  As if the client 
had not written the log.

Script sent to at follows:


#!/bin/sh

# email error log to designated addressee, append logs to histories,
# then remove

# author gary lee
# date created 04/10/2015

#customizations necessary
# change the two log names to suit your machine.
# change subject text to suit.
# change $RECIP appropriately
# format string in the date command may need to be altered based on
# the date format in your schedule and error logs.
#
# this scripts full path name is the argument to postschedulecmd in dsm.sys

# variables

DATE=$(date '+%m/%d/%Y')
HOST=$(hostname -s)
RECIP=glee AT bsu DOT edu
LOGDIR=/opt/tivoli/tsm/client/log/
ERRLOG=dsmerror.log
ERRLOGHISTORY=dsmerror.log.hist
SCHEDLOG=dsmsched.log
SCHEDLOGHISTORY=dsmsched.log.hist

cat $LOGDIR$SCHEDLOG >> $LOGDIR$SCHEDLOGHISTORY
cat $LOGDIR$ERRLOG >> $LOGDIR$ERRLOGHISTORY

mailx -s " DSMerror.log from $HOST $DATE " $RECIP <$LOGDIR$ERRLOG
mailx -s " DSMsched.log from $HOST $DATE " $RECIP <$LOGDIR$SCHEDLOG
rm -f $LOGDIR$SCHEDLOG
rm -f $LOGDIR$ERRLOG
touch $LOGDIR$SCHEDLOG
touch $LOGDIR$ERRLOG

any help appreciated.

<Prev in Thread] Current Thread [Next in Thread>