Remote Wake Up Service
The Remote Wake Up Service, also known as Wake on LAN, or WoL, is a method of switching on a computer remotely across a network. The computer must be plugged into mains power for this to work, but it can be switched OFF: it does NOT need to be in Standby, Hibernate or any other power saving mode.
NOTE: you can't just plug in a computer and expect it to wake, you usually need to shutdown a computer so it is left in the correct state to be woken. Wake on LAN is available on most modern computers.
Enabling WoL on your computer
You can see if your computer supports Wake on LAN by checking the BIOS (press F2 or ESC when you switch on your computer) and look for Wake on LAN under Power settings. After switching on Wake on LAN in the BIOS, reboot your computer. Here are a couple of examples,
With some hardware you must set Enable PME to ON. In Windows Vista you can do this as follows,
- Select System » Device Manager » Hardware
- Click on the network adapter
- Click the Advanced tab
- Set Enable PME to on
Using the Wake Up Service
First shutdown the computer you wish to wake up, make sure to leave it plugged in and the network cable is attached. To wake up this computer, from another computer,
- Open a web browser and login to the Connect web site
- Go to the Personal » Registrations page
- Select the computers you want to wake up
- Click the Wake Up link
- Confirm by clicking Send WoL Packets
The target computer should then boot. If the computer you want to wake is not listed you will need to see your local computing officer to make sure you are registered as a user of the machine.
To connect to the target computer you will need to enable remote access, for instance remote desktop or secure shell.
You can review a history of wake up requests you have sent on the Logs page.
Using a script to wake machines
You can also use your own scripts to automatically wake a group of computers. Here is an example using curl from the command line,
curl -k -F "login_name=XXXXX" -F "login_pswd=XXXXX" https://connect.ncl.ac.uk/wol.php?m=dell1:dell2:dell3
and here is an example showing a simple PHP script to wake computers.
#!/usr/bin/php -q <?php $mylogin = "XXXXX"; $mypasswd = "XXXXX"; $mymachines = "pond01:pond02:pond03:pond04"; $url = "https://connect.ncl.ac.uk/wol.php?m=".$mymachines; $ch = curl_init(); $data = array('login_name' => $mylogin, 'login_pswd' => $mypasswd); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HEADER, 0); $output = curl_exec($ch); curl_close($ch); ?>
For more information on cURL see the cURL web site.