various restart commands ? | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

various restart commands ?

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-04-2002
champion champion is offline
Registered User
 
Join Date: Jul 2002
Last Activity: 15 November 2005, 5:10 AM EST
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
various restart commands ?

hi,

i am running a Sun Solaris 8 Sparc machine.

i would like to know the differences between the following commands :

1) init 6
2) reboot
3) shutdown -y -i6 -g0

any other machine restart commands (for multi-user mode)?

pls help me.

thanks
Sponsored Links
    #2  
Old 09-04-2002
wolk wolk is offline
Registered User
 
Join Date: Aug 2002
Last Activity: 20 April 2004, 1:37 AM EDT
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Check the man pages(man <command>)
I just had a look and it seems to me that shutdown is bringing the system down in civilized kind a way, it sends the info to users and so on and so on, but at the end it cals init 6 any way.
I'm running RH linux so i don't know a thing about solaris, but it want hurt to check /etc/inittab - that seems to be a config file for init.

see yaa mate
Sponsored Links
    #3  
Old 09-05-2002
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 22 July 2014, 2:47 PM EDT
Location: Ashburn, Virginia
Posts: 9,894
Thanks: 56
Thanked 413 Times in 248 Posts
On solaris, "shutdown -i6 -g0 -y" is very close to "init 6". But with shutdown, you could have used -g60. You can't do that calling init directly. The reboot command basicly just invokes the uadmin system call. It is a rough shutdown, but it is a bit better than just letting power drop so it might be used by a ups with only a few seconds of battery power or something.

I prefer the shutdown command. A SunOS dude tried the init thing on HP-UX...which is a very bad move. HP has a poor inittab structure and changing run levels via init will bypass the shutdown scripts. So (I think) the shutdown command may be more universal. But my universe is just SunOS and HP-UX...
    #4  
Old 09-05-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
 
Join Date: Aug 2001
Last Activity: 18 April 2013, 3:03 PM EDT
Location: San Antonio, TX,
Posts: 1,070
Thanks: 0
Thanked 4 Times in 4 Posts
I agree with Perderabo.


The only time I really use reboot is when I am in Single user mode and need to reboot to get to multi. There may be other cases, but that's it for me.

Regarding init I can't think of the last time that I used it for anything. I occasionally use it for going from multi to init 4 to test scripts that I have written and then come back to init 3 for multi. Sometimes I will use it to go to init 2 and then patch my boxes before rebooting (shutdown -ry now).

I most situations for taking down a system shutdown is the only way to fly.

man 1m shutdown

Sponsored Links
    #5  
Old 09-06-2002
pbonilla pbonilla is offline
Registered User
 
Join Date: Aug 2002
Last Activity: 3 February 2012, 3:50 PM EST
Location: arizona
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
to bring down the system CLEAN, you need to accomplish 3 things
Sync memory to disk
unmount all file systems
Kill a processes cleanly (not Kill -9)

Init 6 does all three by using run control scripts (RC#)
shutdown call on the init comman to shutdown(default is s init 3 but can bu substituted by using the -i option)
reboot does not call on init command and can cause a memory dump or currupt your file system.

hope this helps

Peter
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Any Restart Script? ademah Shell Programming and Scripting 5 06-25-2009 05:05 AM
Can BASH execute commands on a remote server when the commands are embedded in shell bash_in_my_head Shell Programming and Scripting 1 12-04-2008 12:51 AM
code that reads commands from the standard i/p and executes the commands Phrozen Smoke Programming 4 01-22-2007 01:06 AM
sshd restart ashterix AIX 2 11-28-2005 10:50 AM
its happend after restart. onlytorobin Shell Programming and Scripting 3 10-01-2004 07:43 AM



All times are GMT -4. The time now is 03:20 PM.