HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: What happens if shutdown script "hangs"
Operating System - HP-UX
1834082
Members
2019
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2000 03:24 AM
01-31-2000 03:24 AM
What happens if shutdown script "hangs"
I am shutting down an Informix DB engine via the HP UX shutdown scripts. There
is a risk (though minor) that the command that shuts down the engine will
"hang" (the Informix engine will not respond).
If this happens in the middle of the shutdown sequence (the shutdown is
numbered K100informix in sbin/rc2.d), will the "hanging of the script" (since
there is no response) cause the shutdown sequence to hang, or is there some
kind of timeout, etc.?
If the shutdown hangs, I am thinking of coding another script called by the
first script to check if the Informix command has ended. If not, I would kill
the Informix command from this second script, thus enabling the first script to
continue. Does this sound feasible?
Thanks in advance.
is a risk (though minor) that the command that shuts down the engine will
"hang" (the Informix engine will not respond).
If this happens in the middle of the shutdown sequence (the shutdown is
numbered K100informix in sbin/rc2.d), will the "hanging of the script" (since
there is no response) cause the shutdown sequence to hang, or is there some
kind of timeout, etc.?
If the shutdown hangs, I am thinking of coding another script called by the
first script to check if the Informix command has ended. If not, I would kill
the Informix command from this second script, thus enabling the first script to
continue. Does this sound feasible?
Thanks in advance.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2000 06:25 AM
01-31-2000 06:25 AM
Re: What happens if shutdown script "hangs"
Yes, it is possible for a shutdown script to hang, preventing th eshutdown from
continuing. There is no automaic timeout of which I am aware. As a rule, I
generally wrap my shutdown scripts with monitors which will either send out
page notification or kill relevant processes (depending upon the item which is
hung)
continuing. There is no automaic timeout of which I am aware. As a rule, I
generally wrap my shutdown scripts with monitors which will either send out
page notification or kill relevant processes (depending upon the item which is
hung)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2000 08:36 PM
01-31-2000 08:36 PM
Re: What happens if shutdown script "hangs"
Alan,
Could you provide an example of a monitor script ?
Thanks!
Could you provide an example of a monitor script ?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2000 09:49 PM
02-02-2000 09:49 PM
Re: What happens if shutdown script "hangs"
Thanks for the response!
I also would to see your an example monitoring script that is in production.
This is the monitoring script I have coded, but NOT tested. It is started in
the background by the "informix.stop" shell, which is called from
/sbin/init.d/informix (K100informix). Is this the right direction?
#!/bin/sh
# %M% %I% of %G%
# %W%
###############################################################################
# checkinf.stop
###############################################################################
# Title: checkinf.stop
#
# This script checks the shutdown for informix to make sure it does not hang.
###############################################################################
# Capture Informix information from the .profile of the informix ID and
# execute it so that the database can be started.
INFHOME=`grep informix /etc/passwd | head -1 | cut -d: -f6`
grep INFORMIXSERVER ${INFHOME}/.profile > ${INFHOME}/.tmppro
grep INFORMIXDIR ${INFHOME}/.profile >> ${INFHOME}/.tmppro
grep ONCONFIG ${INFHOME}/.profile >> ${INFHOME}/.tmppro
. ${INFHOME}/.tmppro
rm ${INFHOME}/.tmppro
export PATH=$PATH:$INFORMIXDIR/bin
# Wait 150 seconds before checking status. Should be plenty of time for
# the onmode -ky command to finish.
sleep 150
ONMODE=`ps -ef | grep -c "onmode -ky"`
if [ ${ONMODE} -gt 1 ]
then
# Get process id of onmode and informix.stop and kill them.
ONMODEPID=`ps -fuinformix | grep "onmode -ky" | awk '{print $2}'`
INFSTOPID=`ps -fuinformix | grep "informix.stop" | awk '{print $2}'`
kill -15 $ONMODEPID
kill -15 $INFSTOPID
fi
# Wait 30 seconds before checking status again. Should be plenty of time for
# the kill -15 commands to finish.
sleep 30
ONMODE=`ps -ef | grep -c "onmode -ky"`
if [ ${ONMODE} -gt 1 ]
then
# Get process id of onmode and informix.stop and kill them.
ONMODEPID=`ps -fuinformix | grep "onmode -ky" | awk '{print $2}'`
INFSTOPID=`ps -fuinformix | grep "informix.stop" | awk '{print $2}'`
kill -9 $ONMODEPID
kill -9 $INFSTOPID
fi
exit 0
I also would to see your an example monitoring script that is in production.
This is the monitoring script I have coded, but NOT tested. It is started in
the background by the "informix.stop" shell, which is called from
/sbin/init.d/informix (K100informix). Is this the right direction?
#!/bin/sh
# %M% %I% of %G%
# %W%
###############################################################################
# checkinf.stop
###############################################################################
# Title: checkinf.stop
#
# This script checks the shutdown for informix to make sure it does not hang.
###############################################################################
# Capture Informix information from the .profile of the informix ID and
# execute it so that the database can be started.
INFHOME=`grep informix /etc/passwd | head -1 | cut -d: -f6`
grep INFORMIXSERVER ${INFHOME}/.profile > ${INFHOME}/.tmppro
grep INFORMIXDIR ${INFHOME}/.profile >> ${INFHOME}/.tmppro
grep ONCONFIG ${INFHOME}/.profile >> ${INFHOME}/.tmppro
. ${INFHOME}/.tmppro
rm ${INFHOME}/.tmppro
export PATH=$PATH:$INFORMIXDIR/bin
# Wait 150 seconds before checking status. Should be plenty of time for
# the onmode -ky command to finish.
sleep 150
ONMODE=`ps -ef | grep -c "onmode -ky"`
if [ ${ONMODE} -gt 1 ]
then
# Get process id of onmode and informix.stop and kill them.
ONMODEPID=`ps -fuinformix | grep "onmode -ky" | awk '{print $2}'`
INFSTOPID=`ps -fuinformix | grep "informix.stop" | awk '{print $2}'`
kill -15 $ONMODEPID
kill -15 $INFSTOPID
fi
# Wait 30 seconds before checking status again. Should be plenty of time for
# the kill -15 commands to finish.
sleep 30
ONMODE=`ps -ef | grep -c "onmode -ky"`
if [ ${ONMODE} -gt 1 ]
then
# Get process id of onmode and informix.stop and kill them.
ONMODEPID=`ps -fuinformix | grep "onmode -ky" | awk '{print $2}'`
INFSTOPID=`ps -fuinformix | grep "informix.stop" | awk '{print $2}'`
kill -9 $ONMODEPID
kill -9 $INFSTOPID
fi
exit 0
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP