Home page Services provided Software available Site licenses Systems status Local Documentation Windows 2000 Reporting problems Links Contact information





Next Previous Contents

8. Check to see if TSM has hung

Unfortunately, the communication between the TSM client and server hangs from time to time. It is difficult to "see" this as well, since the client daemon is still present and running. It is therefore useful to have scripts to check if the TSM log file is growing is size and if the date is changing. If you choose to use these scripts below, please change the email address from mine to yours.

8.1 Linux

Create the following two scripts: /etc/cron.daily/adsm.date.check and /etc/cron.daily/adsm.size.check. Where /etc/cron.daily/adsm.date.check looks like (you'll need to replace the "first.last@yale.edu" with your email address):

#!/usr/bin/perl
#
# Script to check if TSM log file is older than 1.5 days.
#   Written by Paul Gluhosky    28 April 2000
#       Copyright 2000
#
$hostname = `/bin/hostname`;
open (ADSMLOG, "/usr/adsm/dsmsched.log") ||
      die "can't open TSM log file: $!";
if (-M ADSMLOG >= 1.5) {
      open MAIL,"|mail first.last\@yale.edu";
      print MAIL "Check TSM on $hostname\n";
      close MAIL;
#      die "TSM log file greater than 2 days old.";
}
And /etc/cron.daily/adsm.size.check looks like:
#!/bin/sh
#
# Script to check the size of the TSM log file.
#    Written by Paul Gluhosky    28 April 2000
#       Copyright 2000
#
cd /usr/adsm
Test1=`ls -s dsmsched.log | cut -f 1 -d d`
HOST=`/bin/hostname`
if test $Test1 -gt 1
then
   echo $Test1 is OK > /dev/null
else
   echo Check TSM on $HOST | Mail -s "Check TSM daemon" first.last@yale.edu
fi

8.2 Other UNIX

Have a cron job, which doesn't have to be root, that looks like this:

0       4       *       *       *       /usr2/gluhosky/command/adsm.date.check
0       4       *       *       *       /usr2/gluhosky/command/adsm.size.check
Where adsm.data.check looks like:
#!/usr/sbin/perl
#
# Script to check if TSM log file is older than 1.5 days.
#   Written by Paul Gluhosky    28 April 2000
#       Copyright 2000
#
$hostname = `/usr/bsd/hostname`;
open (ADSMLOG, "/usr/adsm/dsmsched.log") ||
      die "can't open TSM log file: $!";
if (-M ADSMLOG >= 1.5) {
      open MAIL,"|mail first.last\@yale.edu";
      print MAIL "Check TSM on $hostname\n";
      close MAIL;
#      die "TSM log file greater than 2 days old.";
}
And adsm.size.check looks like:
#!/bin/sh
#
# Script to check the size of the TSM log file.
#    Written by Paul Gluhosky    28 April 2000
#       Copyright 2000
#
cd /usr/adsm
Test1=`ls -s dsmsched.log | cut -f 1 -d d`
HOST=`/usr/bsd/hostname`
if test $Test1 -gt 1
then
   echo $Test1 is OK > /dev/null
else
   echo Check TSM on $HOST | Mail -s "Check TSM daemon" first.last@yale.edu
fi
You should obviously change the email address to someone other than the author!


Next Previous Contents




Certifying authority: Paul Gluhosky
Manager, AM&T Workstation Support Services
URL: http://wss.yale.edu/doco/ADSM
Last update: 12.08.06
AMT home pageITS home pageYale Front DoorContact usSearchWorkstation Support Services home page