Chapter 8. Tuning DB2 for Content Manager 187
# Rotates server log files, without affecting users who may be
# connected to the server.
DATE=`date +%Y.%m.%d`
LOGDIR=$1
ENDDIR=$2
LOGS=$3
(cd $LOGDIR;
for i in $LOGS; do
if [ -f $i ]; then
cp -p $i $i.$DATE
cp /dev/null $i
/usr/bin/gzip -v $i.$DATE
fi
done
)
if [ -f $LOGDIR/*.gz ]; then
# chown wasuser:wasgroup $LOGDIR/*.gz
chmod 644 $LOGDIR/*.gz
mv $LOGDIR/*.gz $ENDDIR
fi
Our recommendation
Log files should not be deleted until you are absolutely sure that they will not be
needed for any type of recovery. We recommend moving non-active log files from
the log directory to another “logs to be deleted” directory located on a different
disk. Depending on your recovery strategy, when you are sure that you no longer
need the logs, you can delete them from this directory.
You can also use Tivoli Storage Manager as a destination for log-file archival.
8.3.6 Pruning diagnostics file
DB2 continually writes all diagnostic information to the db2diag.log file, which is
intended to be used by DB2 customer support for troubleshooting purposes. You
control the level (and amount) of detailed information that is written to the file by
using the DIAGLEVEL configuration parameter.

Get Performance Tuning for Content Manager now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.