I can has safe shutdown?
-
I done goofed... How do you shutdown a SunOS system correctly?
Edit: FFS. Apparently it's
poweroff
. Not sure why there's a "shutdown" command that doesn't do this, but whatever...
-
http://www.howtogeek.com/howto/solaris/shut-down-or-reboot-a-solaris-system/
The one I usually use:
shutdown -y -i5 -g0
Very intuitive
-
@Tsaukpaetra What a friendly user experience
! ! !
-
@Tsaukpaetra said in I can has safe shutdown?:
Edit: FFS. Apparently it's
poweroff
. Not sure why there's a "shutdown" command that doesn't do this, but whatever...There's also
halt
andreboot
. IMEhalt
andpoweroff
are usually equivalent, but I guess it's an ACPI thing.
-
@Tsaukpaetra said in I can has safe shutdown?:
Not sure why there's a "shutdown" command that doesn't do this
shutdown
does shutdown Solaris when used correctly ;)
-
@Onyx There is also "telinit 0", which tells the system to switch to runlevel 0 (Off)
See documentationOr the universal way that works on every OS : pull the fuckin plug
-
@TimeBandit said in I can has safe shutdown?:
@Onyx There is also "telinit 0", which tells the system to switch to runlevel 0 (Off)
Ugh. That's damned hacky though, IMHO.
@TimeBandit said in I can has safe shutdown?:
Or the universal way that works on every OS : pull the fuckin plug
Oh, the OS won't mind. Your filesystem, drive mechanics and/or on-site admin in Sweden you woke up at 3AM to pull the plug might, depending on FS, hardware or poor on-call sod respecively, of course.
-
@Onyx said in I can has safe shutdown?:
@TimeBandit said in I can has safe shutdown?:
@Onyx There is also "telinit 0", which tells the system to switch to runlevel 0 (Off)
Ugh. That's damned hacky though, IMHO.
Not really. The main difference (I think) is that shutdown will notify logged-in users that the system is going down, while tellinit 0 won't. If you are the only one logged-in, why would you care ?
telinit just tells the init system to switch to a different runlevel. 0 is Off, 6 is Reboot, etc
@TimeBandit said in I can has safe shutdown?:
Or the universal way that works on every OS : pull the fuckin plug
Oh, the OS won't mind. Your filesystem, drive mechanics and/or on-site admin in Sweden you woke up at 3AM to pull the plug might, depending on FS, hardware or poor on-call sod respecively, of course.
I've pulled the plug at least a couple thousand times and never experienced a hardware failure. But of course, I strongly suggest using the proper command. Pulling the plug should be kept for the worst case scenario.
And if your FS can't survive suddenly loosing power, you need a better FS.
-
@TimeBandit said in I can has safe shutdown?:
And if your FS can't survive suddenly loosing power, you need a better FS.
Tighten up that power!
But seriously, the point isn't the filesystem, the point is the GUY DOING THE WORK THAT ISN'T SAVED YET.
-
@TimeBandit said in I can has safe shutdown?:
I've pulled the plug at least a couple thousand times and never experienced a hardware failure.
@TimeBandit I did not say you're immediately break something, just that it isn't really the best idea ever ;)
@TimeBandit said in I can has safe shutdown?:
And if your FS can't survive suddenly loosing power, you need a better FS.
I know the days of
ext2
are numbered but I still have nightmares offsck
running on 500GBext2
drives... Let's just not :P
-
@Tsaukpaetra said in I can has safe shutdown?:
I done goofed... How do you shutdown a SunOS system correctly?
Edit: FFS. Apparently it's
poweroff
. Not sure why there's a "shutdown" command that doesn't do this, but whatever...Bcuz Linux/Unix! ^O^
-
@Vaire now now, to be fair, IIRC Windows' shutdown command sleeps / hybetnates by default, I forget which. At least it used to in any case. Oh, and it's on a delay too, so the correct command is
shutdown -h -t0
Damn this mobile keyboard not having backtick anywhere, I should install a different one...
-
@Onyx said in I can has safe shutdown?:
Damn this mobile keyboard not having backtick anywhere, I should install a different one...
What OS?
-
@Onyx said in I can has safe shutdown?:
IIRC Windows' shutdown command sleeps / hybetnates by default, I forget which
My understanding is it hibernates kernelspace, but not userspace
-
@anotherusername Android, but it's HTC's keyboard, I'm fairly sure the stock one has it somewhere.
-
@Onyx Try:
Generally I'd expect to find it by long-pressing whatever key has the
'
character.
-
@anotherusername that little bugger, haven't seen it there!
Thanks!
-
@TimeBandit said in I can has safe shutdown?:
pull the fuckin plug
Or (since it was a VM) killing the PID associated with it (or using the hypervisor management tool to do the same but "safely"). :D
@Onyx said in I can has safe shutdown?:
There's also halt and reboot. IME halt and poweroff are usually equivalent, but I guess it's an ACPI thing.
Yay for a commandlet for everything?
IIRC yes, if your device isn't ACPI compliant
halt
will simply do everything it can to shut off the computer and then set the CPU with a Halt instruction or nop loop (usually just after it prints a message about turning off the machine).@loopback0 said in I can has safe shutdown?:
shutdown does shutdown Solaris when used correctly
Well duh, but by default apparently this system was configured not to do the Right Thing by default.
I mean, if I enter the commandifconfig
, should I not expect some amount of interface configuration information to come up by default, or should I be expected to know I should have doneifconfig -i eth0
if I wanted anything done?Or, with a windows example, should I expect
winword.exe
all by its lonesome to open a new document by default, or should I have to dowinword.exe "%appdata%\Microsoft\Templates\Normal.dotm"
?
-
@Tsaukpaetra said in I can has safe shutdown?:
Well duh, but by default apparently this system was configured not to do the Right Thing by default.
I've never used a *nix system where just typing
shutdown
orsudo shutdown
actually did that. Normally it requires at least one argument. That's the same with Windows.@Tsaukpaetra said in I can has safe shutdown?:
should I be expected to know I should have done ifconfig -i eth0 if I wanted anything done?
ifconfig
on its own on Solaris tells you the arguments, so it's hardly making you go find them.ifconfig -a
gives you the output others give by default.
-
@loopback0 said in I can has safe shutdown?:
Normally it requires at least one argument.
That's OK. We've got a whole thread dedicated to this right here! :D
-
@loopback0 said in I can has safe shutdown?:
I've never used a *nix system where just typing shutdown or sudo shutdown actually did that. Normally it requires at least one argument.
Shows you how much I use *nix, eh? Anyways, I did try various arguments, just that the most obvious ones didn't work. Heck, I would have been glad if it gave you a list of arguments (descriptions being a bonus), but instead it had a default "no arguments needed" mode that was unexpected.
I say, either have argument-less operation do nothing, print out help (even a simpleHey, I need to know how far you want me to really shut down!
), or do the most commonly expected thing (Hmm, what would a user running a command of this name expect it to do? I know! Broadcast messages to all the logged-on terminals, wait a bit, then switch to runlevel 5! Because being in single-user mode is the same thing as being shutdown, right?)
-
@Tsaukpaetra I never used SunOS, but if it's anything like other Unix, you have two options :
shutdown --help will give you a short description of the options
man shutdown will give you the full manual
-
@blakeyrat said in I can has safe shutdown?:
@Tsaukpaetra What a friendly user experience
! ! !
In the typical use case of SunOS/Solaris, a user shutting down the system is more or less a worst-case-scenario.Edit: Sorry, I made a mistake. In the CDE environment you can just press the power button on the keyboard and then click "suspend" or "shutdown", just like on a Mac.
-
@TimeBandit said in I can has safe shutdown?:
man shutdown will give you the full manual
Or tell you to go away and read bloody
info shutdown
which will suck because you've (sensibly) not installed any of that and you just want the damn computer to turn off!Developers who insist on using texinfo need severe chastising. Like discourse-level giant purple chastising.
-
-
@loopback0 said in I can has safe shutdown?:
Solaris CDE is horrendous
It was better than the equivalent on a few other commercial Unixes.
-
@dkf Maybe. But even with its interaction with the power button, it is still pretty much some make-up onto an ugly system. I've had a Sun system with Solaris 9 at home for a couple of years. But even installing security updates was almost like rocket science. The usefulness of the man-pages was also nearly zero. In almost all aspects it felt like a system only to be used after a long and expensive training and certification procedure.
-
@Grunnen Solaris 10 at least also came with the Java Desktop Environment - which despite its name isn't built on Java and is actually based on Gnome.
-
@Grunnen said in I can has safe shutdown?:
In almost all aspects it felt like a system only to be used after a long and expensive training and certification procedure.
Of course. Those courses were a significant money spinner for quite a lot of people.
But the alternatives were still mostly butt-ugly. (Alas, I never used the real NeWS, but rather just the things that were sort of partially derived from it in a dumb-ass way.)
-
@TimeBandit said in I can has safe shutdown?:
shutdown --help will give you a short description of the options
Yeah, I was tired and didn't think of trying that, since it looked like it was doing the Right Thing be default but getting stuck somewhere (the RPC error thing is likely a red herring). After all, if it looks like it's doing what you told it to do (well, except "failing" for some undisclosed and undisplayed reason), do you go to the help for it?
Put another way, if I do
ping google.com
and it just saysno route to host
, do I blameping
or the fact that my network is disconnected?That's the unexpected behavior. I would have been fine if it did literally anything else than pretend to shutdown and drop me back into the shell (well, fine, the single-user mode login prompt ), because an error or an apparent non-action may have prompted further research, but from the actions it did made it appear to me that the problem was with the shutdown command itself.
-
@Tsaukpaetra said in I can has safe shutdown?:
Put another way, if I do ping google.com and it just says no route to host, do I blame ping or the fact that my network is disconnected?
BTW,
ping -n 8.8.8.8
tends to be one of the better ways to test routability (provided you don't work for the alphabet company). Easy to remember, and doesn't try to screw around with DNS (in case that's what's broken… )