FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 04-04-2008, 05:04 PM
Steven Lembark
 
Default Emergency shutdown, how to?

Dale wrote:
> Steven Lembark wrote:
>>
>> > Well, this one takes longer. Just the foldingathome takes about 20
>> > seconds or more to shutdown. It can take over 60 seconds at times.
>> > That service for some reason has to completely shutdown before the
>> > others start to shutdown. The others will shutdown in parallel like I
>> > have set up. Then there is all the other services that have to stop.
>> > Quite literally, I only had seconds to shutdown since the P/S was
>> > stinking like a skunk. I just needed to umnount the file systems and
>> > power off as fast as possible. I didn't want to just pull the plug but
>> > I needed a shutdown that fast.
>>
>> Hackint the shutdowns to background the shutdown
>> op and return is usually pretty simple -- don't know
>> why more app's don't do that by default.
>>
>> 'halt' will get you down with little typing if you
>> want to bypass the init scripts; so will "kill -TERM 1".
>> Add a 'sync' before either of them and you'll probably
>> be able to come up with minimal trouble.
>>
>
> What's the difference between halt command and shutdown? I thought they
> were basically the same thing.
>
> Also, in case you missed it. I have a service, foldingathome, that
> takes a while to stop and no other service can be stopped in parallel
> with this one. That is one of my key sticking points with the
> shutdown. Most of the others are pretty fast. I just needed the
> quickest *clean* shutdown I could get.
> Thanks

I have four FAH jobs running on my compute server. I
can "kill -TERM fah6" in about 0.70 sec here, they
start up again and just keep going. FAH is pretty
robust when it comes to restarts; again if you crash
the proc's then it won't be any worse than the outcome
of loosing power: FAH will have to pick up its pieces
and keep going. At least with "halt -f" you'll get
the kernel space cleaned up.

Halt will stop the O/S (see note from manpage, below).
In this case a 'halt -f' would get the system down
about as quickly as possible without just hitting
the reset button.

NOTES
Under older sysvinit releases , reboot and halt should never be
called
directly. From release 2.74 on halt and reboot invoke
shutdown(8) if
the system is not in runlevel 0 or 6. This means that if halt or
reboot
cannot find out the current runlevel (for example, when
/var/run/utmp
hasn't been initialized correctly) shutdown will be called, which
might
not be what you want. Use the -f flag if you want to do a hard
halt or
reboot.

--
Steven Lembark 85-09 90th St.
Workhorse Computing Woodhaven, NY, 11421
lembark@wrkhors.com +1 888 359 3508
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-04-2008, 05:06 PM
Steven Lembark
 
Default Emergency shutdown, how to?

>>> In most cases you'll find that 'shutdown -h now'
>>> takes only a few seconds.
>>>
>>
>> you must have nice hardware
>>
>
> He must have. I have a AMD 2500+ CPU with 1Gb of ram. It's not the
> slowest but not the fastest either.

Pair of dual-PIII VA Linux machines, one compute
server with twin dual-core opterons. Main thing
that speeds up the AMD box is using 320MB scsi's
for near-term storage. They are hugely faster than
[S]ATA or IDE used on most equipment these days.

--
Steven Lembark 85-09 90th St.
Workhorse Computing Woodhaven, NY, 11421
lembark@wrkhors.com +1 888 359 3508
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-04-2008, 07:52 PM
Dale
 
Default Emergency shutdown, how to?

Steven Lembark wrote:


I have four FAH jobs running on my compute server. I
can "kill -TERM fah6" in about 0.70 sec here, they
start up again and just keep going. FAH is pretty
robust when it comes to restarts; again if you crash
the proc's then it won't be any worse than the outcome
of loosing power: FAH will have to pick up its pieces
and keep going. At least with "halt -f" you'll get
the kernel space cleaned up.

Halt will stop the O/S (see note from manpage, below).
In this case a 'halt -f' would get the system down
about as quickly as possible without just hitting
the reset button.

NOTES
Under older sysvinit releases , reboot and halt should never be
called
directly. From release 2.74 on halt and reboot invoke
shutdown(8) if
the system is not in runlevel 0 or 6. This means that if halt or
reboot
cannot find out the current runlevel (for example, when
/var/run/utmp
hasn't been initialized correctly) shutdown will be called, which
might
not be what you want. Use the -f flag if you want to do a hard
halt or
reboot.




I see your point on stopping FAH. Here, when I do a regular stop, it
has a 17 second wait, can be 60 seconds depending on what it is doing at
the time. That is if it is called by /etc/init.d/zzfah stop. I didn't
have time to type in a lot of commands at the point my P/S was stinking
my room up. You are also correct that FAH is very robust. It writes
its restart point every 3 minutes on this rig so the most it will loose
is about 3 minutes. I have only lost data with FAH once.


I did test the halt -f command last night. I must say, it was fast. It
was literally a few seconds, very few. I did have one file system that
was . . . well . . . a little upset. I use reiserfs and after a fsck,
everything was fine. I also learned to add the -p option to that
command. The halt -f command but did not power off my system.


I learned a lot with this ordeal. One thing is that the P/S's
protection circuit must have worked very well. My mobo is doing just
fine so no damage outside of the P/S itself. I also learned that the
halt -f -p command should be really fast if this happens again.


Keep those thoughts coming.

Dale

:-) :-)
--

gentoo-user@lists.gentoo.org mailing list
 
Old 04-04-2008, 08:24 PM
Steven Lembark
 
Default Emergency shutdown, how to?

> I learned a lot with this ordeal. One thing is that the P/S's
> protection circuit must have worked very well. My mobo is doing just
> fine so no damage outside of the P/S itself. I also learned that the
> halt -f -p command should be really fast if this happens again.
>
> Keep those thoughts coming.

poweroff -f;

NAME
halt, reboot, poweroff - stop the system.

SYNOPSIS
/sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] [-h]
/sbin/reboot [-n] [-w] [-d] [-f] [-i] [-k]
/sbin/poweroff [-n] [-w] [-d] [-f] [-i] [-h]


--
Steven Lembark 85-09 90th St.
Workhorse Computing Woodhaven, NY, 11421
lembark@wrkhors.com +1 888 359 3508
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-04-2008, 09:05 PM
"Mark Knecht"
 
Default Emergency shutdown, how to?

On Wed, Apr 2, 2008 at 10:48 AM, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Wed, 02 Apr 2008 19:40:37 +0200, Michael Schmarck wrote:
>
> > > Neil even proposed ALT +
> > > SysRq + EISUB, to be sure everything is killed, sync'd and
> > > unmounted.
> >
> > Which might or might not work. But note that I was also talking
> > about applications being in a corrupted state (the database example).
>
> E sends a SIGTERM to all applications. Any well behaved application
> should shut down cleanly on this. I sends a SIGKILL, but it only affects
> programs that were so locked up they ignored E, so you have nothing to
> lose by then.
>

I tried ALT + SysRq + EISUB today on my MythTV backend server which
has been crashing lately. Unfortunately it's crashing so badly that
even at the server's keyboard this didn't work.

I guess my weekend fate of building a new server is sealed...

Cheers,
Mark
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-04-2008, 09:50 PM
Neil Bothwick
 
Default Emergency shutdown, how to?

On Fri, 4 Apr 2008 14:05:42 -0700, Mark Knecht wrote:

> I tried ALT + SysRq + EISUB today on my MythTV backend server which
> has been crashing lately. Unfortunately it's crashing so badly that
> even at the server's keyboard this didn't work.

Do you have CONFIG_MAGIC_SYSRQ=y in your kernel config?


--
Neil Bothwick

A woman walked into a bar and asked the barman for a large double
entendre, so he gave her one.
 
Old 04-04-2008, 10:14 PM
"Mark Knecht"
 
Default Emergency shutdown, how to?

On Fri, Apr 4, 2008 at 2:50 PM, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Fri, 4 Apr 2008 14:05:42 -0700, Mark Knecht wrote:
>
> > I tried ALT + SysRq + EISUB today on my MythTV backend server which
> > has been crashing lately. Unfortunately it's crashing so badly that
> > even at the server's keyboard this didn't work.
>
> Do you have CONFIG_MAGIC_SYSRQ=y in your kernel config?
>
>
> --
> Neil Bothwick

No Neil, it turns out on that one machine is isn't set. Thanks. I'll
make sure it's set on the new server.

Cheers,
Mark
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-05-2008, 04:42 PM
Steven Lembark
 
Default Emergency shutdown, how to?

> I tried ALT + SysRq + EISUB today on my MythTV backend server which
> has been crashing lately. Unfortunately it's crashing so badly that
> even at the server's keyboard this didn't work.
>
> I guess my weekend fate of building a new server is sealed...

Have fun.

Check out motherboards with watchdog capability
and enable it in the kernel.

--
Steven Lembark 85-09 90th St.
Workhorse Computing Woodhaven, NY, 11421
lembark@wrkhors.com +1 888 359 3508
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-07-2008, 01:07 AM
Iain Buchanan
 
Default Emergency shutdown, how to?

On Sat, 2008-04-05 at 12:42 -0400, Steven Lembark wrote:
> > I tried ALT + SysRq + EISUB today on my MythTV backend server which
> > has been crashing lately. Unfortunately it's crashing so badly that
> > even at the server's keyboard this didn't work.
> >
> > I guess my weekend fate of building a new server is sealed...
>
> Have fun.
>
> Check out motherboards with watchdog capability
> and enable it in the kernel.

watchdogs are nice, and linux makes them ultra-easy to program, but of
course if your watchdog task dies, then the machine effectively hits the
reset button for you - no nice shutdown whatsoever! (Which is what you
want in a hard lock-up, but not if your programming skills are the cause
of the problem

cya,
--
Iain Buchanan <iaindb at netspace dot net dot au>

Evil is that which one believes of others. It is a sin to believe evil
of others, but it is seldom a mistake.
-- H.L. Mencken

--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-07-2008, 06:42 AM
Dan Farrell
 
Default Emergency shutdown, how to?

On Fri, 04 Apr 2008 13:06:04 -0400
Steven Lembark <lembark@wrkhors.com> wrote:

> Main thing
> that speeds up the AMD box is using 320MB scsi's
> for near-term storage. They are hugely faster than
> [S]ATA or IDE used on most equipment these days.

what R/W speeds can you expect?
--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 06:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org