Koozali.org: home of the SME Server

UPS Shutdown and Wake-on-LAN

brad

UPS Shutdown and Wake-on-LAN
« on: October 08, 2003, 11:51:19 PM »
Hello, everyone!

I am testing out the SME version 6.0beta3 and playing with
the Wake-on-Lan feature of my motherboard and network card.

My setup has my APC UPS gracefully shutting down the server in
the event of a power outage, thanks to Contribs.org and Darrell May!
(http://wiki.contribs.org/weblinks/redirect.php?id=173)

 I would like the server to turn itself back on when the power
comes back on, or when  I try to access the web site from the
internet.
 
Is what I'm trying to accomplish even  possible?

Or should I skip the whole UPS unit and set my BIOS "Restart on AC Power Loss"  to "Previous State". (Meaning if the server loses power, it will turn back on when power is available.  But it will not gracefully shutdown. How bad would that be for Linux?)
 

My system specs:
 -SME 6beta3
 -Asus P2L97 main board, with WOL
 -Celeron 333 MHz CPU
 -512 Mb Ram
 -DFE-538TX D-Link NIC with WOL connected to Cable Modem
 -DFE-530TX D-Link NIX _without_  WOL connected to LAN
 -8 Gig IDE Hard Disk                                  
 -Power Supply 5vsb@720ma (for WOL)  

Thanks!

Andre Courchesne

Re: UPS Shutdown and Wake-on-LAN
« Reply #1 on: October 09, 2003, 08:32:01 AM »
Hi Brad,

  I have a wake-on-lan perl script available on my site. Go to http://www.net-forces.com then FAQ and Linux.

----
Andre Courchesne - Consultant
http://www.net-forces.com

Ray Mitchell

Re: UPS Shutdown and Wake-on-LAN
« Reply #2 on: October 09, 2003, 02:06:41 PM »
Brad

> My setup has my APC UPS gracefully shutting down the server in
> the event of a power outage,
>  I would like the server to turn itself back on when the power
> comes back on, or when  I try to access the web site from the
> internet.

Sounds like you are mixing up different functions ???

Graceful shutdown of server and UPS happens in the event of power failure and is controlled by the UPS signals.
When the power returns your server will start up automatically (as set in the BIOS)
This protects your server file system from errors caused by unexpected forced shutdown due to unforseen power loss (with v5.6 ext3 and above this issue is less critical).

Wake on LAN function will wake up a server that has gone into low power standby mode (in this case the power system & UPS would have to be on (normal) so that the server could in fact wake up.
 
> Or should I skip the whole UPS unit and set my BIOS "Restart
> on AC Power Loss"  to "Previous State".

If you have a UPS with the APCUPSD rpm, graceful shutdown and restart should all happen automatically (if set up correctly) and with the BIOS set to "Restart on AC power loss", which is what you would normally want to happen on a always on server.

> Is what I'm trying to accomplish even  possible?
> I would like the server to turn itself back on ............
> or when I try to access the web site from the
> internet.

I think so, as long as you realise they are different things.
Leave your UPS settings and functionality as they are, but add in the other Wake on LAN functionality that you additionally want

You also seem to be using Wake on LAN (implying access from other workstations on the LAN), in the same mouthful as Wake on Internet access, they sound like different things to me also. Probably depends on settings in your BIOS which requests wake up the system.

Try the link that Andrew suggested (I don't know what it specifically does), also search these forums for Wake on LAN as this was discussed earlier this year (approx) with some good suggestions put forth, I think there was some good info on the devinfo site, so search there too.

You will need a NIC and m/b that supports WOL which you appear to have.

Hope this is useful
Regs
Ray Mitchell


Brad

Re: UPS Shutdown and Wake-on-LAN
« Reply #4 on: October 09, 2003, 06:56:42 PM »
Thank-you Ray and Andrew and the person that emailed me off-list.  

I was mixing up the two functions (WOL and UPS restart).

I did not realize that my UPS can only power on the computer
if the BIOS "Restart on AC Power Loss" is set to "Previous State".

That is why I wanted to be able to use Wake-on-Lan.

Someone emailed me off-list with this link:

http://nam-en.apc.com/cgi-bin/nam_en.cfg/php/enduser/std_adp.php?p_sid=uw6tAmVg&p_lva=1003&p_faqid=57&p_created=1000309964&p_sp=cF9zcmNoPTEmcF9ncmlkc29ydD0mcF9yb3dfY250PTc2NSZwX3NlYXJjaF90ZXh0PXN0YXJ0IHVwIGNvbXB1dGVyIHdoZW4gcG93ZXIgcmV0dXJuJnBfc2VhcmNoX3R5cGU9MyZwX3Byb2RfbHZsMT1_YW55fiZwX3Byb2RfbHZsMj1_YW55fiZwX3BhZ2U9MQ**&p_li=

It goes to the American Power Corp. site FAQ page "Computer will not automatically reboot after UPS has shutdown and restarted".



So, thankyou again.

Andy Parkinson

Re: UPS Shutdown and Wake-on-LAN
« Reply #5 on: October 10, 2003, 01:00:34 AM »
I notice that Andre has a perl script on his site to wake machines up on his network.  I would like to add that a similar utility is supplied with e-smith for the last few versions and that is ether-wake. Just type ether-wake at the command prompt and then the mac address.

Graham

Re: UPS Shutdown and Wake-on-LAN
« Reply #6 on: October 10, 2003, 03:33:28 AM »
I just have one setting in the BIOS Power managment to monitor
LAN card and one to spindown HDD after 15 mins. When a http / tcp/ip request is made the disc spins up and delivers the data.

Its quite simple but works every time. I am not bothered about putting the entire PSU and Mobo into suspend or whatever and in my expereince this has often caused trouble. However I think that spinning down the disc as an alternative to leaving it running permamently is a good idea if you system is on all the time but there is often long periods of inactivity.

Any care to comment further ?

Klaus Eckert

Re: UPS Shutdown and Wake-on-LAN
« Reply #7 on: October 10, 2003, 04:09:13 AM »
hey Graham,

it's not a good idea to spin down the disk after 15 min.
the most harm to the HD is done when it has to start up.
most HDs are designed to run over 100'000 hours, but only if the have less startups.
especially for SCSI-disks it is not helpful if they have to start running very often.

cheers klaus

Scott

Re: UPS Shutdown and Wake-on-LAN
« Reply #8 on: October 10, 2003, 05:51:24 AM »
So what do you do if the power comes back on after the PC has shutdown but BEFORE the UPS has shutdown (totally run out of battery)

The PC cannot turn back on because power has not been lost to the PX. So the server sits there turned off while the UPS charges again.

I have had this happen before. Because the PC has shut down there is basically no pull on the UPS and it can stay slighty charged for ages.  Then the power comes back on and the PC doesn't know it.

Marcello

Re: UPS Shutdown and Wake-on-LAN
« Reply #9 on: October 10, 2003, 11:52:29 AM »
> The PC cannot turn back on because power has not been lost to the PX. So the
> server sits there turned off while the UPS charges again.

That's where WOL or Wake on Modem would come in handy, I guess.
Does anyone know of a UPS that will wake up the server once power is restored?

Brad

Re: UPS Shutdown and Wake-on-LAN
« Reply #10 on: October 10, 2003, 05:32:22 PM »
Marcello:  Check out almost any SMART-UPS from APCC.COM (American Power Corp.)

I have been using a BACK-UPS 300 power unit, and it will not "Go into Sleep Mode" and remove power to its outlets. Only the SMART-UPS units will do that.  Please note that you will need the BIOS on the motherboard set correctly to "Restart after AC Power Loss".

Check out my previous posting for a link to APCC.COM FAQ page.  This is where I am getting my information from..

Have a Good Day!