Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 en.wikipedia.org/wiki/Wake-on-LAN 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
1  
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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.