- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Shutdown Scripts
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
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
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
тАО11-05-2008 07:17 AM
тАО11-05-2008 07:17 AM
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1078076
Is the above right?
The reason I am asking is, I put my shutdown scripts under rc2.d and probably that is the reason that server is taking forever to reboot. So I did rs to come the server fast, even though that is not the gentle way to reboot, this is just a test node and no database is there.
Please throw some light....
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2008 07:28 AM
тАО11-05-2008 07:28 AM
Re: Shutdown Scripts
The basics:
The systems boots into multi-user level. The script files should be located in /sbin/init.d and a symbolic link with the name:
/sbin/rc3.d:
SNNservice_name To start the service
/sbin/rc0.d
KNNservice_name To stop the service
Thanks,
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2008 07:32 AM
тАО11-05-2008 07:32 AM
Re: Shutdown Scripts
There's nothing wrong with linking your shutdown scripts in the rc2.d directory. This is associated with run level 2, which is still at a multi-user level, but if you want your apps to be down at that run level, it's your call.
As for taking so long to reboot, check the /etc/rc.log to see what is being shutdown and how long it's taking. Could be the shutdown script that's causing the problem, not the run level it runs in.
robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2008 07:32 AM
тАО11-05-2008 07:32 AM
Re: Shutdown Scripts
The manpages for 'rc(1M)' tell you everything you need to know:
"If a start script link (e.g., /sbin/rcN.d/S123test) in sequencer N has a stop action, the corresponding kill script should be placed in sequencer N-1 (e.g., /sbin/rcN-1.d/K200test). Actions started in level N should be stopped in level N-1. This way, a system shutdown (e.g., transition from level 3 directly to level 0) will result in all subsystems being stopped."
If you have a startup script in level-3 with its shutdown component linked at level-0 the process will still work; it just isn't consistent with the standard.
If you do a 'reboot' the normal shutdown scripts are *not* executed. The 'reboot' command is actually the last step of 'shutdown', so of course, an ungraceful down is faster than a graceful one!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2008 07:35 AM
тАО11-05-2008 07:35 AM
Re: Shutdown Scripts
Forgot to add this on the first reply, sorry.
robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2008 07:36 AM
тАО11-05-2008 07:36 AM
Re: Shutdown Scripts
Yeah, for some reason all our HPUX servers takes so long to reboot(atleast 15 min), that is the reason I started to research, as I rebooted one server today.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2008 07:52 AM
тАО11-05-2008 07:52 AM
Re: Shutdown Scripts
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2008 08:02 AM
тАО11-05-2008 08:02 AM
Re: Shutdown Scripts
> use # shutdown -r now to reboot the server
The 'now' argument only means don't wait before beginning to execute the shutdown sequence. This doesn't mean don't execute the kill scripts!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2008 09:21 AM
тАО11-05-2008 09:21 AM
Re: Shutdown Scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2008 09:30 AM
тАО11-05-2008 09:30 AM
Re: Shutdown Scripts
Look towards the end of the file and you should see a lot of information about /sbin/rc?.d/K* scripts being run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2008 09:56 AM
тАО11-05-2008 09:56 AM
Solution> I want to find the errors logged from the shutdown scripts but not the startup scripts.
# Look at '/etc/rc.log.old' for your last shutdown messages.
That said, why do you think you have errors during the running of shutdown scripts?
A server taking "fowever" to reboot could point to long startup or long shutdown.
Do you have an Oracle database, perhaps, where the database is asked to shutdown but has to wait for all updates to complete? Watching the events on the *console* will probably tell you much more than the 'rc' logs. The console checklist gives you a better measure of which step(s) require the most time to complete.
Regards!
...JRF...