Sample Assure MIMIX for AIX shutdown script - assure_mimix - assure_mimix_for_aix - 6.0

Assure MIMIX for AIX Guide

Product type
Software
Portfolio
Integrate
Product family
Assure
Product
Assure MIMIX™ Software for AIX
Version
6.0
ft:locale
en-US
Product name
Assure MIMIX for AIX
ft:title
Assure MIMIX for AIX Guide
Copyright
2025
First publish date
2003
ft:lastEdition
2025-10-08
ft:lastPublication
2025-10-08T06:18:25.453000
L1_Product_Gateway
Integrate
L2_Product_Segment
IBM Infrastructure
L3_Product_Brand
Precisely Assure
L4_Investment_Segment
IBM i HA
L5_Product_Group
IBM i HA
L6_Product_Name
Assure MIMIX for AIX

This section shows a sample Assure MIMIX for AIX shutdown script. The shutdown script needs to be executed at the end of the application server shutdown sequence, after all applications have been stopped gracefully.

Sample Assure MIMIX for AIX Shutdown script

#!/bin/ksh
#****** <Insert your application stop script here> ******
 
#****** Modify the CONTEXT_ID (Primary ContextID) below ******
#****** to match your environment ******
CONTEXT_ID=1
 
# Read Environment and Common Functions
. /usr/scrt/bin/sccfgd_arch
DATE_CMD=$(date +"%Y-%m-%d %T")
 
 
RTSTOPLOG=/usr/scrt/log/rtstop_c${CONTEXT_ID}.log
echo "${DATE_CMD}: Shutting down ${PRODUCT_NAME} ..." > $RTSTOPLOG
 
/usr/scrt/bin/rtumnt -C${CONTEXT_ID}  >> $RTSTOPLOG 2>&1
if [[ $? -eq 0 ]]
then
        echo "${DATE_CMD}: rtumnt failed" >> $RTSTOPLOG 2>&1
        for i in `/usr/scrt/bin/sclist -C${CONTEXT_ID} -f`
               do
               fuser -k $i
               done
        /usr/scrt/bin/rtumnt -C${CONTEXT_ID} >> $RTSTOPLOG 2>&1
       if [[ $? -ne 0 ]]
       then
                echo "${DATE_CMD}: rtumnt failure" >> $RTSTOPLOG 2>&1
               exit 1
       fi
fi
 
/usr/scrt/bin/rtstop  -C ${CONTEXT_ID} -kFv >> $RTSTOPLOG 2>&1
if [[ $? -ne 0 ]]
then
    echo "${DATE_CMD}: ${PRODUCT_NAME} shutdown failed" >> $RTSTOPLOG 2>&1
   exit 1
fi
 
echo "${DATE_CMD}: ${PRODUCT_NAME} shutdown successful" >> $RTSTOPLOG 2>&1
exit 0