Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to check if a computer on a local machine is in a sleep or awake, but without waking it on LAN. If I ping the machine then machine automatically wakes up. I don't want that. I just need to check the status of a computer.

All machines are Mac's running Mac OS X Lion.

share|improve this question
Most NICs can be set to wake the system on receipt of a magic packet (not just a regular ping, but a specific hey you with this MAC, wake up) or to wake the host on any network traffic. Can you check change those settings on the local machines? – Hennes Nov 13 '12 at 8:34
I can change settings on local machines sure, but I have no idea what a magic packet is :S? Please advise... – Primoz Rome Nov 13 '12 at 8:44
A magic packet is a broadcast frame containing anywhere within its payload 6 FF FF FF FF FF FF, followed by sixteen repetitions of the target computer's 48-bit MAC address. See for more details. --- The important part is that it needs to be a specific packet. Thus other broadcasts or pings to not wake the target. – Hennes Nov 13 '12 at 8:47
So is there like a terminal command I can call to send this? – Primoz Rome Nov 13 '12 at 8:53
These settings are usualy at network card preferences, there you can set waking up computer by network or limiting only to usage of magic packet / that's the thing you need, standard ping won't wake the machine, thus you know it's off. But that's on Windows machines. – week Nov 13 '12 at 11:32

Two general approaches will solve this issue:

  1. ping from the monitored hosts at regular intervals
  2. instruct the NIC to leave the OS rest on pings.

In the first case you will be monitoring for activity from target hosts, if it goes quiet, then it is sleeping.

In the second case you have to configure the wake on lan capabilities of your network interfaces to respond only to a specific type of wol-signal, and not to any ping. Alternatively you may disable wake on lan entirely. In which case (presumably) the hosts will respond to pings only if they are awake.

Regrettably, I have no Mac OS X to play with, but perhaps the wake on lan settings may be configured the same way as in FreeBSD (man 8 ifconfig, look for wol).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .