Checking if a computer on local network is a sleep or not without waking it

5

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.

Primoz Rome

Posted 2012-11-13T08:31:56.257

Reputation: 681

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 – 2012-11-13T08:34:39.973

I can change settings on local machines sure, but I have no idea what a magic packet is :S? Please advise... – Primoz Rome – 2012-11-13T08:44:14.480

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 http://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 – 2012-11-13T08:47:18.277

1So is there like a terminal command I can call to send this? – Primoz Rome – 2012-11-13T08:53:47.733

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 – 2012-11-13T11:32:20.163

Answers

1

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).

Ярослав Рахматуллин

Posted 2012-11-13T08:31:56.257

Reputation: 9 076

0

Try Apple Remote Desktop - it have "current status" column in machine list. App costs not too much and pretty functional.

Alexander

Posted 2012-11-13T08:31:56.257

Reputation: 1