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





Next Previous Contents

7. Log file rotation

The log files tend to grow very large. It's a good idea if you rotate the log files and compress the older ones.

7.1 Linux

Create a file called /etc/logrotate.d/adsm. Here is the contents:

/usr/adsm/dsmsched.log {
    missingok
    postrotate
        /bin/touch /usr/adsm/dsmsched.log
    endscript
}

/usr/adsm/dsmerror.log {
    missingok
    postrotate
        /bin/touch /usr/adsm/dsmerror.log
    endscript
}

/usr/adsm/dsmsched.pru {
    missingok
    postrotate
        /bin/touch /usr/adsm/dsmsched.pru
    endscript
}

7.2 Other UNIX

You should have a root crontab entry as follows:

1       2       *       *       0       /usr/adsm/rotate-adsm
Where /usr/adsm/rotate-adsm looks like:
#!/bin/sh
#
# Script to rotate and compress the TSM log files.
#NOTE: This is for IRIX clients
#
#     Written by   Paul Gluhosky    23 March 2000
#          Copyright 2000
#
LOG1=/usr/adsm/dsmsched.log
LOG2=/usr/adsm/dsmsched.pru
LOG3=/usr/adsm/dsmerror.log
LOG4=/var/adm/backup.log

for LogFile in $LOG1 $LOG2 $LOG3 $LOG4; do

   if [ -f $LogFile.1.gz ]; then
      /sbin/rm $LogFile.1.gz
   fi

   if [ -f $LogFile ]; then
      /sbin/mv $LogFile  $LogFile.1
      /usr/sbin/gzip $LogFile.1
   fi

   /sbin/touch $LogFile

done
#!/bin/sh 
# 
# Script to rotate and compress the TSM log files. 
# 
#NOTE: This version is for Solaris 2.x 
# 
#     Written by   Paul Gluhosky    09 April 2001 
#          Copyright 2000-1 
# 
LOG1=/usr/adsm/dsmsched.log 
LOG2=/usr/adsm/dsmsched.pru 
LOG3=/usr/adsm/dsmerror.log 
LOG4=/var/adm/backup.log 
  
for LogFile in $LOG1 $LOG2 $LOG3 $LOG4; do 
  
   if [ -f $LogFile.1.gz ]; then 
      /usr/bin/rm $LogFile.1.gz 
   fi 
                                                                           if [ -f $LogFile ]; then 
      /usr/bin/mv $LogFile  $LogFile.1 
      /usr/bin/gzip $LogFile.1 
   fi 
  
   /usr/bin/touch $LogFile 
  
done 


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