Has anyone experience with WOL under Centos (5.3).? If so, how exactly do you put the machine to sleep, and how exactly do you wake it up remotely?
Timothy Murphy wrote:
Has anyone experience with WOL under Centos (5.3).? If so, how exactly do you put the machine to sleep, and how exactly do you wake it up remotely?
I've never found WOL to work at all well in any environment.
for it to work at all, you need A) network hardware on the client that supports WOL and remains powered when the system is asleep or hibernating and B) a method of sending the WOL 'magic bullet' packet to the MAC address of the target machine. This means you need to track the MAC addresses of the system as it won't be awake to ARP.
WOL can wake up the system from power states Off (ACPI state S5), Hibernate (S4), or Sleep (S3), so as long as you can get or or another of these states working, and you can get the WOL mechanics working, you got it.
This is a decent reference:
http://en.wikipedia.org/wiki/Wake-on-LAN
I wrote WoL code for cluster provisioning software earlier in my career. It is actually quite simple. So long as your motherboard/NIC support WoL and you have ACPI support then a simple "shutdown" will halt your OS but the NIC will still have power. The NIC is ready to receive the magic packet while in this state. You simply need to send the packet from anywhere else on the net (it could be sent over the Internet, it does not have to be on adjacent LAN) and the system will power up. Easy.
I've used it on Centos 4.3 and I know it works there.
There are tools out there that make it easy to send the packet (works just like ping) or you can write your own.
-geoff
--------------------------------- Geoff Galitz Blankenheim NRW, Germany http://www.galitz.org/ http://german-way.com/blog/
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Timothy Murphy Sent: Samstag, 4. April 2009 22:32 To: centos@centos.org Subject: [CentOS] Wake on LAN
Has anyone experience with WOL under Centos (5.3).? If so, how exactly do you put the machine to sleep, and how exactly do you wake it up remotely?
On Sat, Apr 4, 2009 at 4:31 PM, Timothy Murphy gayleard@eircom.net wrote:
Has anyone experience with WOL under Centos (5.3).? If so, how exactly do you put the machine to sleep, and how exactly do you wake it up remotely?
Put the machine in a suspend to ram state using acpi:
echo -n mem > /sys/power/state you can use disk instead of mem
Machine should go down real quick - if you've got services / devices running that aren't compatible with suspend, it may wake up right away.
This "works for me" under Fedora 10, no idea about how it would work under Centos 5.3 - but it appears the interface is there regardless. I had to unmount nfs directories and unload my network driver before the system would stay asleep. if you put the sleep command in a script, when the OS wakes, it will continue executing the script, making it easy to resume services / devices that needed to be discontinued prior to sleeping.
-Gordon