1846838 Members
8346 Online
110256 Solutions
New Discussion

Re: shutdown logging

 
Eugene_3
Occasional Advisor

shutdown logging

It seems to me that the rc requencer logs into /etc/rc.log file only when HP-UX system starts up (results of S* startup scripts). Is there any similar log keeping track of what scripts (basicaly K* scripts) were performed when the system went down?

Thanks,
Eugene
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: shutdown logging

Hi:

Yes, /etc/rc.log.old is the copy of /etc/rc.log.old that is posted during startup. It contains the last shutdown messages from "K" scripts.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: shutdown logging

Hi (corrected copy):

Yes, /etc/rc.log.old is the copy of /etc/rc.log that is posted during startup. It contains the last shutdown messages from "K" scripts.

...JRF...
Eugene_3
Occasional Advisor

Re: shutdown logging

Hi James,

I rebooted my system by reboot -s and checked what in the /etc/rc.log.old are. There wasn't any entry from "K" scripts, for example, K480syncer or K800killall from /sbin/rc0.d, nor from K90oracle script (same directory) written on my own to normally bring the oracle database down which actually worked upon the system shutdown (according to the database alert log). So I see only previous startup information in /etc/rc.log.old file and no any shutdown one.

???

Eugene


James R. Ferguson
Acclaimed Contributor

Re: shutdown logging

Hi Eugene:

The key is that you used 'reboot' and not 'shutdown'.

'shutdown' invokes the kill scripts via the /sbin/rc mechanism and *then* calls 'reboot'.

...JRF...
Mark Vollmers
Esteemed Contributor

Re: shutdown logging

James is right. When you shutdown, it should write both startup and shutdown information. The file should start with a line saying that rc.log moved to rc.log.old, and then have all the startup info, and then list the shutdown info. Use "shutdown -r" to reboot and it should log everything.

mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Eugene_3
Occasional Advisor

Re: shutdown logging

Thank you guys,

I see the difference: kill scrits write into rc.log by shutdown command.

BTW: Why "init 6" command does not reboot HP-UX system (I tried it) as it does in Solaris and SCO for example?

Regards,
Eugene
Mark Vollmers
Esteemed Contributor

Re: shutdown logging

I could be off here, but I think it is because HPUX builds the init levels up. Level 0 is single user mode, most of our apps run at level 3 or 4 (I think). I suppose that a level 6 could exist if created, but it would be high up on the chain. If you watch when shutdown operates, it takes the server down to init level 0 and then sends the reboot command from there. I don't think that moving to init 0 will reboot, though. Like I said, however, I could be off here. can anyone confirm this?

mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"