EMC Celerra Command Reference Manual page 500

Hide thumbs Also See for Celerra:
Table of Contents

Advertisement

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
500
Celerra Network Server Command Reference Manual

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Celerra and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF