diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2006-08-26 09:49:59 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2006-08-26 09:49:59 +0000 |
commit | 28c12356ac2e3c2578dc0b330ed6bb1245a8eeeb (patch) | |
tree | 1e20a8fd262efc828d0a97920bdb2d7d81aa0820 /site-summary | |
parent | d4eb01b361e7910a2e64346665dffeda2f8d76be (diff) | |
download | sitesummary-28c12356ac2e3c2578dc0b330ed6bb1245a8eeeb.tar.gz sitesummary-28c12356ac2e3c2578dc0b330ed6bb1245a8eeeb.tar.bz2 sitesummary-28c12356ac2e3c2578dc0b330ed6bb1245a8eeeb.tar.xz |
The system is now operational.
Diffstat (limited to 'site-summary')
-rwxr-xr-x | site-summary | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/site-summary b/site-summary new file mode 100755 index 0000000..4d0f5e0 --- /dev/null +++ b/site-summary @@ -0,0 +1,28 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use SiteSummary; + +my %sites; + +for_all_hosts(\&handle_host); + +print_summary(); + +sub handle_host { + my $hostid = shift; + #print "$hostid\n"; + for my $site (get_site($hostid)) { + $site = "" unless defined $site; + $sites{$site}++; + } +} + +sub print_summary { + printf(" %-20s %5s\n", "site", "count"); + for my $site (sort keys %sites) { + printf(" %-20s %5d\n", $site, $sites{$site}); + } +} |