Manually testing using
I think you can test it using a tool like
etherwake. Depending on the distro it's called
etherwake on Ubuntu/Debian,
ether-wake on RHEL/CentOS/Fedora. I had it installed already by default on Fedora, it's part of the net-tools package.
To use it:
$ ether-wake 00:11:22:33:44:55
$ etherwake 00:11:22:33:44:55
To confirm that a server support WOL:
$ ethtool eth0
Settings for eth0:
Supported ports: [ ]
Supported link modes:
Supports auto-negotiation: No
Advertised link modes: Not reported
Advertised auto-negotiation: No
Supports Wake-on: g
Link detected: yes
The "Supports Wake-on: g" and "Wake-on: g" tell you that the card is configured for WOL support. If it's missing you can add it to the
ifcfg-eth0 config. file like so:
I noticed that if you look through the
hwinfo there are messages regarding how the system came out of power save mode. Also there are messages related to the ethernet device coming up. For example:
<6>[721194.499752] e1000e 0000:00:19.0: wake-up capability disabled by ACPI
<7>[721194.499757] e1000e 0000:00:19.0: PME# disabled
<7>[721194.499831] e1000e 0000:00:19.0: irq 46 for MSI/MSI-X
<6>[721194.574306] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
<6>[721194.576330] ehci_hcd 0000:00:1a.0: power state changed by ACPI to D0
Here are some other messages a little while later:
<6>[721197.226679] PM: resume of devices complete after 3162.340 msecs
<7>[721197.226861] PM: Finishing wakeup.
<4>[721197.226862] Restarting tasks ... done.
<6>[721197.228541] video LNXVIDEO:00: Restoring backlight state
The idea would be that maybe there are some messages here related to how the system came up (WOL or power switch). You could add a script that runs as part of a udev event that could grep through the hwinfo output to see if messages are present for WOL vs. powerswitch. Just a idea at this point.