EasyManua.ls Logo

EMC Celerra

EMC Celerra
522 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
500
Celerra Network Server Command Reference Manual
Using Celerra Command Scripts
unable to connect to host|\
socket: All ports in use|\
database resource vanished|\
Connection timed out|\
NAS_DB locked object is stale"
#
# function to log messages to a file
#
nas_log()
{
DISKCHK=`df -k $LOGDIR|awk 'NR>1{print $5}'|sed 's/\%//'`
# if there's enough free disk space, append to log
if [ $DISKCHK -lt $DISKFULL ]; then
TDSTAMP=`date +%Y-%m-%d' '%T`
echo $TDSTAMP: $LOGMSG >> $LOGDIR/$LOGFILE
fi
# regardless of available space, always write last error
echo $TDSTAMP: $LOGMSG > $LOGDIR/$LOGLAST
}
#
# function to execute (and potentially retry) commands
#
nas_cmd()
{
# initialize variable(s)
retry_count=0
# loop until either successful of retry count exceeded
while [ $retry_count -le $RETRIES ]; do
# execute command and gather response
RES=`$CMD 2>&1`
# check if response means command is recoverable
if [ `echo "$RES"|egrep -c "$RECOVERABLE"` -ne 0 ]; then
# check retry count
if [ $retry_count -ne $RETRIES ]; then
# retry count has not been exceeded
LOGMSG="Command ($CMD) failed with ($RES)...retrying in
$SLEEPTIME s"
nas_log
sleep $SLEEPTIME
else
# retry count has been exceeded

Table of Contents

Other manuals for EMC Celerra

Related product manuals