- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Shutdown Log from rc.log.old
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
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
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
04-12-2011 03:35 AM
04-12-2011 03:35 AM
Shutdown Log from rc.log.old
I have written a script to shutdown a server remotely. Shutdown process took 25 Minutes.
Rc log shows device busy, however after 25 minutes it shuts down.
Please let me know why it took 25 Minutes ? My UPS will last only 15 minutes.
rc.log.old Shows following.
***********************************************
System shutdown in progress
Sat Apr 9 16:00:05 IST 2011
***********************************************
.......
.......
Move nextboot kernel configuration into place
Output from "/sbin/rc0.d/K850kcshutdown stop":
----------------------------
* Please wait: flushing kernel registry database to disk.
* The kernel registry database has been saved to disk.
"/sbin/rc0.d/K850kcshutdown stop" SKIPPED
Unmount file systems
Output from "/sbin/rc0.d/K900localmount stop":
----------------------------
umountall: umount : has failed.
umountall: diagnostics from umount
umount: cannot unmount /dev/vg00/lvol6 : Device busy
umount: return error 1.
umountall: umount : has failed.
umountall: diagnostics from umount
umount: cannot unmount /dev/vg00/lvol7 : Device busy
umount: return error 1.
umountall: umount : has failed.
umountall: diagnostics from umount
umount: cannot unmount /dev/vg00/lvol8 : Device busy
umount: return error 1.
Stopping all Volume Manager I/O Daemons
Output from "/sbin/rc0.d/K930vxvm-daemon-kill stop":
----------------------------
***********************************************
HP-UX run-level transition completed
Sat Apr 9 16:03:35 IST 2011
***********************************************
Thanks & regards.
Naba
- Tags:
- shutdown
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2011 04:00 AM
04-12-2011 04:00 AM
Re: Shutdown Log from rc.log.old
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2011 05:13 AM
04-12-2011 05:13 AM
Re: Shutdown Log from rc.log.old
To add an elapsed time on each start/stop script, edit the file:
/sbin/rc.utils
and look for a line of dashes (about line 600-650):
echo "-------------------------- $(date)...
Just before this line, add this:
SECONDS=0
You'll look for eval and result=$? after the sleep code, about 15 lines down. Add this line right after the result=$?
result=$?
echo "${FUNCT_NAME[$I]} -- Elapsed time = $SECONDS sec" >> $LOGFILE
Then look for another row of dashes (there's only two of these in the scrip), somewhere around lines 740-790. Add the same line (SECONDS=0) before the dashed line statement and then add this echo line after result=$?:
result=$?
echo "${FUNCT_NAME[$INDEX]} -- Elapsed time = $SECONDS sec" >> $LOGFILE
NOTE: The first echo uses ${FUNCT_NAME[$I]} while the second uses ${FUNCT_NAME[$INDEX]}.
Now in both rc.log and rc.log.old, you'll have the elapsed seconds for each script. To sort them by length of time:
grep Elapsed /etc/rc.log.old | sort -nk7
The slowest scripts will be at the bottom of the list.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2011 05:50 AM
04-12-2011 05:50 AM
Re: Shutdown Log from rc.log.old
In the absence of any details about what runs on the server you are shutting down, it is difficult to point to anything.
As Bill said, a likely candidate may be a database. For example, the shutdown scripts for an Oracle database might specify 'IMMEDIATE' or 'ABORT' or 'NORMAL'. Consult your DBA for what options are most appropriate for your environment. The time to execute these shutdown variants can differ significantly.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2011 06:35 PM
04-12-2011 06:35 PM
Re: Shutdown Log from rc.log.old
This is a SAP application server. This script shuts down SAP first and checks if SAP is down. Then only it shuts down itself. Also it creates Output of ps -ef before shutdown â hy 0 command. The script is run remotely from another server.
Device busy File system lvol6,lvol7,lvol8 is for /opt,/usr and /var.
Strange thing is if this script is run now, it shutsdown properly .
Please Let me know if you want more info.
Thanks & regards.
Naba
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2011 07:54 PM
04-12-2011 07:54 PM
Re: Shutdown Log from rc.log.old
I shall be away from office till 18th April, shall reply after I join office.
Meantime I have attached my shutdown script here for your inspection.
REgards.
Naba