Skip to content

HANDLING WITH AIX ERROR LOG PART ONE : SAVE

#!/usr/bin/ksh
# Rotate Errorlog on local Node

BINPATH=/usr/bin
OUTPUT=/root/system/errpt.out
USRLOC=/usr/local/bin

DATE=`date +%Y%m%d-%H%M%S`

# 1. Extract errtp
$BINPATH/errpt -a > $OUTPUT.$DATE
$BINPATH/gzip $OUTPUT.$DATE

if [ -f $OUTPUT.$DATE.gz ] ; then
$BINPATH/errclear 0
else
echo “Achtung: $OUTPUT.$DATE.gz nicht gefunden!”
exit 3
fi

# eof