The AIX Service Update Management Assistant (SUMA) to download AIX Technology Levels (TL’s), Service Packs (SP’s), and PTF’s from a designated AIX fix server is a very useful method.
But the problem is: how do we know when a new software package is available on the SUMA server to be downloaded?
I also point out that to use SUMA is necessary that IBM knows the hostname of your server and that it is properly enabled.
If you execute the simple test with the command "suma –x –a Action=Preview –a RqType=Latest" and receive a similar message "0500-013 Failed to retrieve list from fix server" something is wrong into the configuration ... please download this useful document
https://www-304.ibm.com/webapp/set2/sas/f/best/Managing_AIX_Updates_Best_Practices.pdfWhen this was done and when you have configured everything as described in the official doc you can also automate the check for the software availability.
I wrote this simple but useful procedure that does this check. Is only required to run the script trough AIX crontab and you will be alerted by automatic email when a new AIX software (TL or SP) is available for download.
#!/usr/bin/ksh
#
# only for crontab use
# Useful to see if a new software AIX was released
#
# Author_name: GDiToro
#
checkin() # preliminary checks
{
# please customise follow dir and files
#########################################################
## INPSWF = please insert the SP or TL level to be check
## OUTSWF = procedure auto generate this file
## OUTSWFLOG= procedure auto generate this file
#########################################################
INPSWF=/export/SUMA/utility/cronf-input.txt
OUTSWF=/export/SUMA/utility/cronf-output.txt
OUTSWFLOG=/export/SUMA/utility/cronf-log.txt
#
# Customise the mail address
print "To:AIXsupport@mydomain.com \nFrom:suma_user@Suma_Server\nSubject:SUMA check for new software AIX" >$OUTSWF
print "*************************************************************************\n" >>$OUTSWF
print " Verify SUMA for availability new software AIX \n" >>$OUTSWF
print " DATE: $HTODAY \n" >>$OUTSWF
print "*************************************************************************\n" >>$OUTSWF
#set -x
if [ -f $INPSWF ]; then
cat $INPSWF|while read TLSP LEVEL
do
case $TLSP in
TL) QSOFT="Technical Level"
L2=`echo $LEVEL|awk '{print substr($0,1,4)}'`
FILTER="${L2}-00"
;;
SP) QSOFT="Service Pack"
L2=`echo $LEVEL|awk '{print substr($0,1,7)}'`
FILTER="${L2}"
;;
*)
print "Error , indeterminable filter" >${OUTSWF}
;;
esac
#echo $TLSP $LEVEL $FILTER
L2=`echo $LEVEL|awk '{print substr($0,1,4)}'`
FILTER="${L2}-00"
suma -x -a Action=Preview -a RqType=${TLSP} -a RqName=${LEVEL} -a FilterML=$FILTER >/dev/null 2>&1
echo $?|read RC
if (($RC == 0)); then
print “Check availability AIX ${TLSP} ${LEVEL}: the software is available for DOWNLOAD\n" >>$OUTSWF
cat $OUTSWF |sendmail -t AIX_support@mydomain.com
else
print "${HTODAY}: check availability for AIX ${TLSP} ${LEVEL}: software NOT YET available" >>$OUTSWFLOG
fi
done
else
print "File "$INPSWF" not found. Procedure ended”
exit 0
fi
exit 0
}
# MAIN
#
#set -x
TODAY=`date -u`
######################################################
checkin
######################################################