File: README

package info (click to toggle)
shutdown-at-night 0.8
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 40 kB
  • ctags: 19
  • sloc: perl: 53; sh: 53; makefile: 18
file content (68 lines) | stat: -rw-r--r-- 2,455 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Saving power by turning off clients at night
============================================

It is possible to save power by turning off clients at night, and turn
them automatically on in the morning.

There are some considerations to make when doing this:

 - The clients should not be shut down when someone is using them.
   This is done by checking the output from 'who', and as a special
   case, checking for the LDM ssh connection command to work with LTSP
   thin clients.

 - To avoid breaking fuses, it is a good idea to make sure all clients
   do not start at the same time.

 - There are two different methods available to wake up clients.  One
   uses a BIOS feature and require a working and correct hardware
   clock, as well as a motherboard and BIOS version supported by
   nvram-wakeup, The other require a server with knowledge about all
   the clients to wake up and for all the clients to have support for
   wake-on-lan.

How to set it up
----------------

On clients that should turn off at night, touch
/etc/shutdown-at-night/shutdown-at-night, or add the hostname (ie the
output from 'uname -n' or 'hostname -s' on the client) to the netgroup
"shutdown-at-night-hosts".  The clients might need to have wake-on-lan
configured in the BIOS.  It is also important that the switches and
routers used between the wake-on-lan server and the clients will pass
the WOL packages to the clients even if the clients are turned off.
Some switches fail to pass on packages to clients that are missing in
the ARP table on the switch, and this block the WOL packages.

To enable wake-on-lan on the server, add the clients to
/etc/shutdown-at-night/clients, with one line per client, IP address
first, and MAC address (ethernet address) next, with space between
them, or create a script /etc/shutdown-at-night/clients-generator to
generate the list of clients on the fly.

Here is an example /etc/shutdown-at-night/clients-generator for use
with sitesummary:

  #!/bin/sh
  PATH=/usr/sbin:$PATH
  export PATH
  sitesummary-nodes -w

An alternative if the netgroup is used to activate shutdown-at-night
on clients is this script using the netgroup tool from the ng-utils
package:

  #!/bin/sh
  PATH=/usr/sbin:$PATH
  export PATH
  netgroup -h shutdown-at-night-hosts

License
-------

This package is licensed using GNU General Public License v2 or later.

Bugreporting
------------

Report issues to the debian-edu@lists.debian.org mailing list.