Rebooting Solaris Machine
There is so many command available to reboot server, but which one is which that will gracefully reboot your Solaris server? Just use “reboot” command?
NO NO NO.
That’s not the right thing to do, unless you have no choice. WHY? Because “reboot” doesn’t proceed the shutdown script command, but will reboot as reboot (confuse huh?). init6 is the better choice, and for that, this is my favorite.
shutdown -y -i6 -g 180 "Message to users"
What it will do is, rebooting the server in 3 minutes (180/60) and will give message to the console to any online users.
For lesser hassle, make sure your auto-reboot = true so that you didn’t have to access ALOM to manual input in OK prompt.
root@jebat10 # eeprom |grep auto-boot
auto-boot?=true
It’s always been nice to warn users first and give them ample time to save their works before you’re going to reboot it. And make sure, that you’re rebooting the intended server !!
root@jebat10 # uname -a
SunOS jebat10 5.10 Generic_127127-11 sun4u sparc SUNW,SPARC-Enterpriseroot@jebat10 # uptime
8:14pm up 288 day(s), 9:50, 7 users, load average: 0.06, 0.08, 0.13root@jebat10 # shutdown -y -i6 -g 180 “===== server going down for reboot in 3 minutes. finish your work immediately !! ==”
Shutdown started. Wed Jun 10 20:43:08 EEST 2009
Broadcast Message from root (pts/12) on jebat10 Wed Jun 10 20:43:09…
The system jebat10 will be shut down in 3 minutes
===== server going down for reboot in 3 minutes. finish your work immediately !! ==
showmount: jebat10: RPC: Program not registered
Broadcast Message from root (pts/12) on jebat10 Wed Jun 10 20:44:09…
The system jebat10 will be shut down in 2 minutes
===== server going down for reboot in 3 minutes. finish your work immediately !! ==
showmount: jebat10: RPC: Program not registered
Broadcast Message from root (pts/12) on jebat10 Wed Jun 10 20:45:09…
The system jebat10 will be shut down in 1 minute
===== server going down for reboot in 3 minutes. finish your work immediately !! ==
showmount: jebat10: RPC: Program not registered
Broadcast Message from root (pts/12) on jebat10 Wed Jun 10 20:45:39…
The system jebat10 will be shut down in 30 seconds
===== server going down for reboot in 3 minutes. finish your work immediately !! ==
showmount: jebat10: RPC: Program not registered
Broadcast Message from root (pts/12) on jebat10 Wed Jun 10 20:45:59…
THE SYSTEM jebat10 IS BEING SHUT DOWN NOW ! ! !
Log off now or risk your files being damaged
===== server going down for reboot in 3 minutes. finish your work immediately !! ==
showmount: jebat10: RPC: Program not registered
Changing to init state 6 – please wait
root@jebat10 # Connection to jebat10-m.europe.nokia.com closed.
Leave a Comment