1 Title: Sitesummary tip: Listing MAC address of all clients
2 Tags: english, debian, debian edu, sitesummary
5 <p>In the recent Debian Edu versions, the
6 <a href="http://wiki.debian.org/DebianEdu/HowTo/SiteSummary">sitesummary
7 system</a> is used to keep track of the machines in the school
8 network. Each machine will automatically report its status to the
9 central server after boot and once per night. The network setup is
10 also reported, and using this information it is possible to get the
11 MAC address of all network interfaces in the machines. This is useful
12 to update the DHCP configuration.</p>
14 <p>To give some idea how to use sitesummary, here is a one-liner to
15 ist all MAC addresses of all machines reporting to sitesummary. Run
16 this on the collector host:</p>
19 perl -MSiteSummary -e 'for_all_hosts(sub { print join(" ", get_macaddresses(shift)), "\n"; });'
22 <p>This will list all MAC addresses assosiated with all machine, one
23 line per machine and with space between the MAC addresses.</p>
25 <p>To allow system administrators easier job at adding static DHCP
26 addresses for hosts, it would be possible to extend this to fetch
27 machine information from sitesummary and update the DHCP and DNS
28 tables in LDAP using this information. Such tool is unfortunately not