0

I have a PHP app runing on local network server (Mac Mini server with OS X Lion). There are several local clients (also Macs) accessing this app. Client machines are put to sleep from time to time. I need to be able to check from PHP server if the local clients are running (wake) or in sleep mode.

I have been successful of doing this with AJAX polling script, where I periodically ping the local machines and display status of a local machine in PHP app. The problem I have is that PING command initiates wake-on-lan on client machines if they are in sleep mode, and this is something I do not want. I would just like to see the status without waking the machine.

Can this be done?

Primoz Rome
  • 10,379
  • 17
  • 76
  • 108

2 Answers2

1

check

pmset -g | grep hibernatemode

http://www.tuaw.com/2010/10/20/safesleep-lets-you-use-safe-sleep-on-demand-on-your-mac/

Community
  • 1
  • 1
romico
  • 11
  • 1
  • OK `pmset -g | grep hibernatemode` will get me a hibernation mode on local compuer. I can't call this status for remote machine if it is in sleep correct? – Primoz Rome Nov 13 '12 at 09:56
0

I would say you need to correctly configure the Wake-on-lan for those machines. Aparently they get awakened for every packet, which is probably not what you require. Usually WoL is configured to wake only on Magic Packet (on Windows it can be configured in Device Manager in the properties of network card driver). Then you will be able to use ping (or any other type of network traffic) to check if PC is online.

Marki555
  • 6,434
  • 3
  • 37
  • 59