1752785 Members
6256 Online
108789 Solutions
New Discussion юеВ

Re: Shutdown malfuntion

 
Juan Manuel L├│pez
Valued Contributor

Shutdown malfuntion

Hi all,
Yesterday, I had shutdown my HP/UX Unix server.
I have typed " shutdown -r now ".
So did not stop the bbdd, that appear on rc2.d
What is the difference between shutdown -r now and reboot ? The first option do not execute level three?
Please, take a look to the attachments.
Thanks in advance.
Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
7 REPLIES 7
Corthouts Carlo
Valued Contributor

Re: Shutdown malfuntion

Hi,

Maybe you should check /etc/shutdown.allow to see who is authorized to shutdown the machine.

Maybe at one point you could have performed a shutdown without -r or -h which puts you machine in single user mode and then only a reboot -r works.

S.K. Chan
Honored Contributor

Re: Shutdown malfuntion

From Technical DB ..

Quote ..

"Shutdown" is generally used when the system is in a multi-user state such as run-level 2. It uses "kill -15" to terminate running processes, which allows them to terminate naturally within a grace period (default of 60 seconds), ensuring the integrity of the file system.

"shutdown" also performs these tasks:
* changes the current working directory to /
* updates all superblocks
* shuts down the accounting subsystem
* halts all daemon processes
* writes the contents of all I/O buffers to disk
* unmounts all file systems

Finally, the system is put into single-user mode (run-level s) and /etc/reboot is called if applicable.

"Shutdown" allows the superuser to warn all users currently logged into the system, that it will be shut down and the superuser can specify a grace period for users to log out, before the shut down process commences.

The system administrator has the ability to customise the shut down procedure through the use of user-supplied scripts placed in the /etc/shutdown.d directory. This exists for users who have specialised shutdown procedure requirements, such as shutting down databases prior to the system shutting down.

One further functionality associated with the "shutdown" command is the ability of the system administrator to authorise certain users to execute "shutdown". This is done by editing the /etc/shutdown.allow file accordingly. However, even though other users may be privileged to use "shutdown" to halt or reboot the system, only the superuser may put the system into single-user mode.

"Reboot" is generally used to reboot or halt the system once in single-user mode. It's default action is to "sync" all disks and then
reboot the system.

To terminate currently running processes, it uses "kill -9" which terminates them immediately. This is dangerous, as processes are not allowed to terminate naturally and it may have undesirable repercussions, such as loss of data.

As all processes are terminated without a grace period, "reboot" is faster than "shutdown" and, therefore, may be used when the system administrator needs to bring the system down very quickly.

"Reboot" also allows the superuser to specify a certain time to halt or reboot the system, and to send a message to users currently logged on, to inform them of the system's impending halt or reboot.

..unquote

BTW could not open your attachment, send it in plain text file would help.

Peter Kloetgen
Esteemed Contributor

Re: Shutdown malfuntion

Hi,

the biggest difference between the shutdown- and the reboot- command are the kill- signals which are sended to processes.

shutdown -r now first tries to send kill signal 15, which tries to end processes properly. Only if this doesn't work, kill -9 is sended to processes.

reboot is faster than shutdown -r, but sends kill -9 signal immediatly to all processes.

hope this helps!

Allways stay on the bright side of life!

Peter

I'm learning here as well as helping
Juan Manuel L├│pez
Valued Contributor

Re: Shutdown malfuntion

Hi Carlo, Thanks for your answer.
The problem is that the system does not stop and start the Oracle databases.
you can take a look to the " parada " file ( stop it is the rc.log.old ), then you can see old start and the new stop. you can see there is an Oracle start, so on the next stop there in not any stop.

Maybe there is difference between " shutdown -r now " and reboot command...

Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
Tom Geudens
Honored Contributor

Re: Shutdown malfuntion

Hi,
If you only have three runlevels, it would seem normal that the shutdown does not pass through runlevel 3. Example :
In /sbin/rc3.d you could put the start of the oracle database :
S020oracle

As a consequence you put the end of the oracle database in /sbin/rc2.d :
K980oracle

So if there are only three runlevels, there are no K(ill)links in /sbin/rc3.d ... so a shutdown does not execute anything there.

If something does not stop, there's probably no K(ill)link for it.

Hope this helps,
Tom
A life ? Cool ! Where can I download one of those from ?
Carlos Fernandez Riera
Honored Contributor

Re: Shutdown malfuntion

Reboot not call /sbin/rcx.d scripts.

Shutdown do it.
unsupported
Juan Manuel L├│pez
Valued Contributor

Re: Shutdown malfuntion

Hi,
I attach the core I found on /
Something wrong should happen with the Oracle stop...I really do not know.
Thanks to all of you.
Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.