A solaris machine can be put to shutdown using the below mentioned commands .But use appropriate command that is required according to the need.
The commands are:-
1.shutdown
2.init
3.halt
4.reboot
5.poweroff
6.stop+A
Syntax of Shutdown command with options.
shutdown -i<init-state> -g<grace-period> -y
where init-state can be 0,S,1,2,3,5,6. The default init-state is S.
where grace-period is to set the wait time of shutdown .The default time is 60 secs.
where -y command continues the shutdown with out prompting the meassage do you want to continue? (y or n)
2. Init :- This command is used to shutdown a single user system or change the runlevel of the system.
syntax: init <run-level>
3.Halt:- This command shutdowns the sytem immediatley with out informing the users.
4.Reboot:- Reboots immediatley with out informing the users .The speed of such a reboot is useful in certain circumstances, such as when you’re rebooting from the single-user run state and reconfigures the system.
example:-reboot -- -rs
5. Poweroff- Shutdowns the system with out notifying the users. If the hardware supports the power off it also turns off the power to system.
6.stop+A :Stop+A Interrupts any program currently running and puts the system at the OpenBoot prompt, ready to accept OpenBoot PROM commands.
The Solaris reboot, poweroff, and halt commands stop the processor and synchronize the disks, but they perform unconditional shutdown of system processes. These commands are not recommended because they do not shut down any services and unmount any remaining file systems where as init and shutdown are the most reliable ways to shut down a system, because these commands shut down services in a clean, orderly fashion and shutdown the system with minimal data loss
The commands are:-
1.shutdown
2.init
3.halt
4.reboot
5.poweroff
6.stop+A
1. Shutdown:- .This command is mostly used to shutdown server machines which consists of different users so that the users would be informed before shutting down the system. The default wait time for bringing the system to singler user state(root ) is 60 secs. In order to issue shutdown command one should have root priviliges.
Syntax of Shutdown command with options.
shutdown -i<init-state> -g<grace-period> -y
where init-state can be 0,S,1,2,3,5,6. The default init-state is S.
where grace-period is to set the wait time of shutdown .The default time is 60 secs.
where -y command continues the shutdown with out prompting the meassage do you want to continue? (y or n)
2. Init :- This command is used to shutdown a single user system or change the runlevel of the system.
syntax: init <run-level>
The below table describes about different run-levels in detail
RUN LEVEL
|
DESCRIPTION
|
0
|
Stops system services and daemons.
Terminates all running processes.
Unmounts all file systems.
|
S
|
System
administatorr state. Only root is allowed to login.Only crictical file
systems are monuted
|
1
|
System
administatorr state. Only root is allowed to login. Local file sysytems are
also mounted.
|
2
|
Normal multi-user operation state ,
without network file systems (NFSs)
|
3
|
Normal multiuse operation of a file server, with NFSs
shared.
|
5
|
Power-down state. Shuts down the system so that it is
safe to turn off power to the system.
|
6
|
Reboot state.
|
3.Halt:- This command shutdowns the sytem immediatley with out informing the users.
4.Reboot:- Reboots immediatley with out informing the users .The speed of such a reboot is useful in certain circumstances, such as when you’re rebooting from the single-user run state and reconfigures the system.
5. Poweroff- Shutdowns the system with out notifying the users. If the hardware supports the power off it also turns off the power to system.
6.stop+A :Stop+A Interrupts any program currently running and puts the system at the OpenBoot prompt, ready to accept OpenBoot PROM commands.
Advantage of shutdown and init over other commands:-
The Solaris reboot, poweroff, and halt commands stop the processor and synchronize the disks, but they perform unconditional shutdown of system processes. These commands are not recommended because they do not shut down any services and unmount any remaining file systems where as init and shutdown are the most reliable ways to shut down a system, because these commands shut down services in a clean, orderly fashion and shutdown the system with minimal data loss
No comments:
Post a Comment