Home About BC DR HA Support Training Download
You are here: Home/ GlobalSysAdmin/ AIX/ Please Login or Register

-
Current Location
-

js
  GlobalSysAdmin
    AIX
-
AIX Admin Methodology
Global Consolidation Project
All AIX admins should join
www.aixexpert.com


Join our LinkedIn Group
AIX Advanced Technical Experts
Contract Opportunities

www.LinkedIn.com

-
digg Digg this page
del.icio.us Post to del.icio.us
Slashdot Slashdot it!


LPAR Leasing
Lease an AIX / i5 LPAR
Reduce your costs

www.mtxia.com

Server Leasing
Lease a Server off-site
Reduce your costs

www.mtxia.com

Data Center Automation
Business Continuity and DR
Virtualization/Consolidation

www.mtxia.com

HMC Service
Hardware Management Console
Manage Remote AIX / i5 LPARs

www.siteox.com

Business Web Site Hosting
$3.99 / month includes Tools,
Shopping Cart, Site Builder

www.siteox.com

Disaster Recovery
Small Business Oriented
Off-Site Facilities

www.mtxia.com

IBM pSeries / iSeries
Reduce your Costs
Off-Site Server Hosting

www.mtxia.com

This is the script used to stop MQSeries in the HACMP environment.




#!/bin/ksh

TMPFILE="/tmp/tmp${$}.tmp"

# 
# Search the /etc/inetd.conf file for MQSeries listeners
# which are not commented out and correspond with the
# associated Queue Manager running this script.  If
# found, comment out the listener(s), overwrite the
# /etc/inetd.conf file with the new modified version, and
# refresh the "inetd" process.
# 
if sed -e "s/^[^#].*[$' \t']amqcrsta[$' \t'].*${1}.*/# &/g" \
< /etc/inetd.conf \
> ${TMPFILE}
then
  print "Successfully modified /etc/inetd.conf" | tee /dev/console
  if cp ${TMPFILE} /etc/inetd.conf
  then
    print "Successfully replaced /etc/inetd.conf" | tee /dev/console
    if refresh -s inetd
    then
      print "Successfully refreshed the inetd daemon" | tee /dev/console
    else
      print "ERROR: Unable to refresh the inetd daemon" | tee /dev/console 1>&2
    fi
  else
    print "ERROR: Unable to copy to /etc/inetd.conf" | tee /dev/console 1>&2
  fi
else
  print "ERROR: Unable to comment out listeners from /etc/inetd.conf" | tee /dev/console 1>&2
fi
[[ -f ${TMPFILE} ]] && rm -f ${TMPFILE}

# 
# Killing all existing instances of the listener
# 
ps -ef -F pid,args |
grep "[$' \t']amqcrsta[$' \t']*" |
while read PID COMMAND
do
    print "MQSeries: Stopping listeners: kill -9 ${PID}" | tee /dev/console
    kill -9 ${PID}
done

su mqm -c /MQHA/bin/hamqm_stop_su $*


-
mxdaaeai02 MQHA Shutdown
-
 


LPAR Leasing
Lease an AIX / i5 LPAR
Reduce your costs

www.mtxia.com

Server Leasing
Lease a Server off-site
Reduce your costs

www.mtxia.com

Data Center Automation
Business Continuity and DR
Virtualization/Consolidation

www.mtxia.com

HMC Service
Hardware Management Console
Manage Remote AIX / i5 LPARs

www.siteox.com

Business Web Site Hosting
$3.99 / month includes Tools,
Shopping Cart, Site Builder

www.siteox.com

FREE Domain Registration
included with Web Site Hosting
Tools, Social Networking, Blog

www.siteox.com

Disaster Recovery
Small Business Oriented
Off-Site Facilities

www.mtxia.com

IBM pSeries / iSeries
Reduce your Costs
Off-Site Server Hosting

www.mtxia.com