- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shutdown from UPS
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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-20-2004 01:52 AM
01-20-2004 01:52 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 01:55 AM
01-20-2004 01:55 AM
Re: Shutdown from UPS
Database start/stop script is in /sbin/init.d/
directory, I'm attching my oracle script as a template
then a soft link in /sbin/rc3.d K200oracle that points to the /sbin/init.d/oracle script
When ups_mond shuts down the machine, the database will come down normally.
If its oracle, make sure you use shutdown immediate.
LEt me know if you need more details
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 01:56 AM
01-20-2004 01:56 AM
Re: Shutdown from UPS
The database should be handled by the normal shutdown processes (i.e. /sbin/init.d/database and the /sbin/rc(runlevel).d links).
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 02:20 AM
01-20-2004 02:20 AM
Re: Shutdown from UPS
I added "su - oracle -c $ORACLE_HOME/bin/dbshut"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 02:25 AM
01-20-2004 02:25 AM
Re: Shutdown from UPS
It hangs.
I've written a better one.
Attaching
as tar file
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 02:26 AM
01-20-2004 02:26 AM
Re: Shutdown from UPS
Would i get away with a link in rc3.d, that links to a file in init.d called dbasestart:
case "$1" in
start)
/qad/scripts/start.All
;;
stop)
/qad/scripts/stop.All
;;
esac
Would this use the start script on entering run level 3 and the stop script on exiting run level 3?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 02:31 AM
01-20-2004 02:31 AM
Re: Shutdown from UPS
The start script would be invoked when entering run level 3, but the stop script should be the first thing done when entering run level 2, like this:
ll /sbin/rc?.d/*informix
lrwxrwxrwx 1 root sys 21 Jun 2 2000 /sbin/rc2.d/K100inform
ix -> /sbin/init.d/informix
lrwxrwxrwx 1 root sys 21 Jun 2 2000 /sbin/rc3.d/S998inform
ix -> /sbin/init.d/informix
Obviously you would not be using informix!!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 02:57 AM
01-20-2004 02:57 AM
Re: Shutdown from UPS
Just to confirm, the 'S???' and the 'K???' at the beginning of the link in the relevent rc?.d directory is the method by which the run level being invoked 'knows' to run the Start(S???) or Stop(K???) part of the script in init.d
I hope that makes sense!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 03:05 AM
01-20-2004 03:05 AM
Re: Shutdown from UPS
Exactly. I should have mentioned it.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 03:09 AM
01-20-2004 03:09 AM
Re: Shutdown from UPS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 03:34 AM
01-20-2004 03:34 AM
SolutionThe number determines the order with the Start or Kill scripts. I like to do the database last so I use the S998 and the K100, so that it's started late on entering run-level 3 and early on entering run-level2. They actually don't have to be unique but if they're not, it's a crap shoot what order the non-unique scripts get executed.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2004 03:42 AM
01-20-2004 03:42 AM
Re: Shutdown from UPS
A good convention (and it is nothing more than that) is to have your Snnn and KNNN values sum to 1000. For example if you have an S900 startup script, you should have a K100 kill script. The other convention is that if a process/service is started at run level N, it should be killed at run level N-1 and both of these should be a softlink to the "real" script in init.d.