|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
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 | ||
|
![]() |
| Thread Tools | Search this Thread |
| 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 |
|
|