Documents  
Remote and Automated Public Access Computer Power On and Shutdown   
How the Fort Collins (CO) Public Library implemented automatic shutdown and power on of public access computers.
@2006 Lingzhen Zhao

Modern libraries have many public computers for Internet searches, Library Catalog searches and subscribed database searches. Terminals have gradually been replaced by PCs because of the requirements of the GUI (Graphic User Interface), the need to save cookies locally from Internet, and of graphics on subscribed databases. For security reasons or for refreshing computers, public computers usually need to be shut down after the library closes and turned on before the library opens. Turning on and off computers is a routine job of library staff. It costs some staff time and the job itself is not fun. 

The question is – Is it possible to turn on and off public computers remotely or automatically? Fort Collins Public Library proposed automatic shutdown and power on of public computers as two projects to be undertaken and implemented them successfully. 

Remote Shutdown of All Public Computers

1.   Software Selection.

Remote shutdown of computers requires initiation of a shutdown and power off command either by running a batch file or by a scheduler to initialize the command.  There are many shareware and freeware programs to accomplish this task available for downloading.  Our software selection criteria are:

  1. Shutdown can be controlled remotely through a network. Shutdown from a scheduler needs an accurate computer clock. Although this can be done by frequently synchronizing all the computer clocks with a timeserver, it is still not guaranteed that all the computers have the exact same time. Remote control from a central point has a lower accuracy requirement of local computers.
  2. Shutdown should be operated by a batch file to control a group of target computers from one location.
  3. A warning message should be displayed on-screen before shutdown. It is important to give patrons a warning message and enough time to save their files as needed.
  4. The software should be transparent to patrons on the public computers.

After evaluating several poweroff/shutdown software, Poweroff 3.0 (http://users.pandora.be/jbosman/poweroff/poweroff.htm) was selected. This is a matured application that has been improved over many versions. The software meets all our selection criteria such as remote control, available use of a command line (therefore available to create a bat file), display of a warning message before shutdown, and transparence to patrons. The software also allows us to customize the display message and choose how many seconds before poweroff. There is a countdown clock on the screen that clearly informs the patron how many seconds are left before the computer shuts down. A sample screen display is:

shows what the screen displays to warn the user that the computer is being shutdown

Figure 1: Screen Display Before a Computer is Shutdown

2. Configure the Target Computers

The following steps need to be done for each computer to be controlled by power off:

  1. Copy the software to all the target computers (The software does not need to be installed).
  2. Configure the software. Figure 2 is a display of the poweroff executable file.  Under “Action”, the default selection is “Poweroff.” However, because we are controlling the action from a control computer, the selection can be ignored. Under Options, it is important to check “Allow remote control” to control the computer remotely. After selecting this option, the appropriate port is ready to listen to a command from a remote computer. The rest of the options should be unchecked because again, the options will be controlled remotely. Because the software is “Service Based”, after the selections we would “Create service” and “Save the settings to the service.” After the service is created it will automatically start each time the computer is booted.

Interface for Poweroff 3.0

Figure 2: GUI of Poweroff 3.0

3.   Configure the Control Computer

We use one of the reference desk computers as the control computer. First, copy the Poweroff program to the computer’s C drive. For example, copy it to folder C:\Poweroff. Next, create a batch file. This program supports both GUI and Windows commands, so it is possible to create and run a batch file by either a scheduler or just a click on the file or the link of the batch file. The following is an example of bat files for two computers:

C:\poweroff\poweroff.exe poweroff –remote Computer1 -warn -warntime 30 -msg "Computer is shutting down in 30 seconds" -force -quiet -nocancel

C:\poweroff\poweroff.exe poweroff -remote Computer2 -warn -warntime 30 -msg "Computer is shutting down in 30 seconds" -force -quiet –nocancel

In the above command, “C:\poweroff\poweroff.exe” is the location of the poweroff program; the “poweroff” command is to select the “poweroff” option in GUI under “Action” (see Figure 2); the rest of them (-remote, -warn, -warntime, -msg, -force –quite –nocancel) are switches of the poweroff command, described below. 

-remote Computer1: The Poweroff command is for a remote computer, its name is Computer1.

-warn:  Enable warning message to be displayed on the remote computer.

-warntime 30: Warning message will be displayed 30 seconds on the remote computer before shutdown.

-msg: The displayed message is "Computer is shutting down in 30 seconds".

-force: The computer will be forced shutdown, even if some programs/files are open.

-quiet: Don't display error messages, if any.

-nocancel: Remote computer user cannot cancel this action.

On the screen display, there is a countdown clock for how many seconds are left before shutdown (see Figure 1).  After this message pops up, a patron can/cannot do the following:

  1. Patrons can click “Ok” and the computer will shutdown immediately;
  2. Patrons cannot cancel the shutdown action, since “Cancel” is grayed out.
  3. Patrons can use the 30 seconds to save they files, if any. 

4. Security Configurations Considerations

There are several security related configurations and considerations in this remote poweroff control process:

  1. The appropriate port must be open on the target computers, which means the port is listening to commands from a remote computer all the time. However, by default, Windows XP’s firewall blocks this port; the port must be opened manually if the computer has Windows XP.
  2. The batch file on the control computer has to be well hidden, because clicking it by accident will shut down all the computers listed in the batch file. To prevent clicking of the file by accident, we created a Word file that displays “Warning: Click the following link will shutdown all the public computers” with a link to the batch file. When the link is clicked, Microsoft Word by default gives another warning: "Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source. Would you like to open this file?" By clicking on “Ok” the bat file will start to run. In this way, the librarian knows what will happen when the bat file link is clicked and makes sure the action is not by accident. The batch file should also be hidden to avoid clicking it by accident.
  3. As I mentioned earlier, the Poweroff program should be transparent to patrons and not shown in System Tray or any other places, in case curious patrons open the program and change anything.

The chance of remote poweroff failing is very small. However, there are some cases of failure. The typical case is communication failure between the control computer and the target computer at that second. The case is complicated, but it is very rare. Another possibility is that the computer hangs and shutdown does not work even if you shutdown locally. Generally, failure rates are very low, probably less than 1 percent, and they are temporary – it happens only at that moment.

Remote Power On of all Public Computers

Like shutdown, it is possible to automatically power on a computer from a scheduler or by clicking on a batch file.  We selected the latter option because of the computer clock accuracy issue and varying library hours.

1.   WOL (Wakeup On LAN) Requirements and How it Works

Wakeup on LAN requires a Wake on LAN network adapter, a Wake on LAN enabled motherboard, and remote management software. The first two requirements are available in newer computers, the third one, software, is available for download from many Websites for free. Two example programs are:

Mcwol.exe – http://www.matcode.com/wol.htm

Wol.exe -- http://www.gammadyne.com/cmdline.htm#wol

We had already used Poweroff 3.0 when we started this project and it has building WOL ability, so we just used the same software.

Sending a “Magic Packet” is a common way to wake up computers. Because the target computer is off, no installed software can affect the computer. However, the computer is connected to power and the network.  The NIC is listening to “Magic Packets.” A Magic Packet is a packet that contains the MAC address of the target computer and a header, and repeats the MAC address 16 times. When a computer hears its MAC address repeated 16 times with the special header, it powers itself on.

2. Preparation for Target and Control Computers to Enable WOL Remotely

Preparation is very easy on the target computers. It involves the following steps:

  1. Changing/checking the BIOS and NIC on all the computers. Wake up on LAN might be disabled in the computer BIOS and needs to be turned on manually.
  2. Make MAC list of the target computers. When a computer is off, the only identification of a computer is its MAC address; its IP address and computer name do not work. Finding MAC addresses from a remote computer over a range of IPs can be performed by software. If you use Poweroff 3.0, there is a way to find MAC address by using this program.  When you select “Wake-On-LAN” and select “Specify..”, you can fill out IP and Subnet Mask and click “Lookup”, MAC address will be fill in automatically.  Another way is to “ping” the computer from a command line and type “arp –a” immediately after the ping.

On the control computer, software must be copied to it. In our case, since we have decided to use the Poweroff 3.0, the software is already there. Next, a batch file must be written so power on can be controlled remotely by batch. The following is the sample of two computers in a batch file:

c:\\poweroff\\poweroff wol -mac 0011439e58b4 -ip 192.168.10.145 -subnet 55.255.255.0

c:\\poweroff\\poweroff wol -mac 00b0d05296b4 -ip 192.168.10.99 -subnet 255.255.255.0

The IP address and subnet mask are required by this Poweroff software, not by the target computer to be woken up. Other software, such as mc-wol.exe or wol.exe, does not require having an IP address and Subject Mask if control computer and target computers are in the same subnet.

3. Limitations and Problems of Using WOL

Although Wake Up On LAN is easy to configure, there are always some special cases due to differences in the BIOS, NICs, and operating systems. Some situations require troubleshooting or upgrading the BIOS or drivers.  An experience I had was that our PAC stations failed wake up, although I enabled Wakeup from BIOS and checked the NIC settings.  The NICs are 3COM 3C905C-TX compatible. Although Microsoft included a generic driver that works for this kind of card, it does not react to Magic Packet. After several tests, I found that the 3COM driver works. Then I changed the drivers on all the PAC stations so they could be woken up.

Depending on the model of the NIC, in some other cases Power Management of the NIC also needs to be modified to work with wake up.

In daily usage, the WOL failure rate is also very low. In our experience, wake-up fails due to only one reason —WOL is disabled in BIOS. If a computer’s power is unplugged while the computer’s battery is low, it will revert the BIOS back to the manufacturers default setting, which disables WOL. This situation has happened several times in our deployment.

Auto logon maybe needed. After a computer is powered on, if the computer is configured to log on manually, meaning it requires a password to log on, the effects of auto/remote power on will be useless because a librarian will still need to go around to log onto computers one by one. So, it is necessary to have remote power on combined with auto logon.

Another limitation is that when you use Poweroff program, the control computer and target computers should be in the same network, because Poweroff uses broadcast —although it is possible for Magic Packet to be sent across routers by multicast. 

Conclusions

From our experience, we think remote shutdown and power on of public computers benefits libraries in two ways. irst, it definitely saves staff time before the library opens and before closing. A reference librarian commented that before remote shutdown was enabled, reference librarians had to walk around and start turning off the computers not in use several minutes before library closed. During this time, they may miss some patrons’ questions. But now librarians can still concentrate on attending to patrons’ needs until the last minute. Second, it also benefits the computer. Remote shutdown ensures a proper shutdown. The poweroff command makes target computers close open files and programs first and then close all the background services before poweroff. Remote poweron also reduces the chance of the power switch breaking due to daily use.

Reference Web Sites:

http://users.pandora.be...wol.html

http://ahh.sourceforge.net/wol/wol.html

http://gsd.di.uminho.pt/jpo/software/wakeonlan/mini-howto/wol-mini-howto.html

About the author
Lingzhen Zhao received her MLIS (Master of Library and Information Science) from the University of Hawaii in 1990, majoring in Library Automation. She worked as a librarian and library manager for a few years before changing her focus to computer systems and network administration because of her interest and talent in computer networks. She worked as a System Administrator for several high tech companies after she received her CNE (Certified Novell Engineer) and MCSE (Microsoft Certified Systems Engineer). She also has received CompTIA A+ certification (Certified Computer Hardware Technician).  She is currently working for the Fort Collins (CO) Public Library as a Network Specialist. Email: (lzhao@fcgov.com)

Special thanks to Jorgen Bosman, the software developer of Poweroff and Carson Block, contributor to this article.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs2.5 License.


Contribute to this topic
Do you have an article, presentation, or other content to share on this topic?
You can post it on this topic page. Find out more about submitting documents in the Member Center.
Ratings You must be signed in to rate this item
Average (0 Votes)
Comments