#!/usr/local/bin/perl5 # # Created by Alison Greenwald 21 Sep 2000 # # #use strict; use CGI qw(:standard escapeHTML); use Time::Local; use RRDs; $DDIR="/data/cyrus"; $GRAPH="/cgi-bin/graph_cyrus_db.pl"; $picdir="/usr/www/tree/current/tainted"; $hpicdir="/current/tainted"; $q= new CGI; print $q->header(); print("Cyrus Stats"); print(""); opendir(DH, $DDIR) or die "Could not find data"; @files = readdir(DH); closedir(DH); %hash=(); $n=0; foreach (@files){ $server = ""; $ds = ""; $n++; ($server, $end) = split /\:/, $_, 2; ($ds,$throwaway) = split /\./,$end,2; if($ds ne ""){ push @{$hash{"$ds"}}, "$server"; } } print("\n"); foreach $service( sort %hash){ if(!$hash{$service}){ next; } print("

$service

\n"); } print("
\n"); print(""); #print head(), start_html("blah"), end-html();