#!/usr/bin/perl
# Opens up a database and produces html output for the contents of the
# WG disk database.
#
# Author: Daniel Graves
# Date:   2004/11/16
# Update by: Mina Nozar on 2005/06/04
#            2005/11/29  (Added displaying of Sum of Free and Total space on all local nodes).
#                        (Added appropriate update dates for /global/home, /global/scratch, and /data area in local nodes).
#            2006/04/12  (Added space usage under /global/scratch/twist/stage).
#                        (Stopped logging here since they are included in cvs logs).
# Updates by: Anthony Hillairet
#	2007/09/11 (Added the displaying of the sets stored on the nodes)
#	2007/11/23 (Now on each node page, all the set and gens on the nodes are displayed
#			Not just those on this particular node.)
#	2008/01/24 (Changed the percentage for low free space from 30% to 11% to take into account the new larger disks)

use strict;
use DB_File;
use CGI qw(:standard);

###############################################################
# Global Variables
my %disks;
my $display;
my $show_entry;
my $total_entries;
my $bsize;
my $status;
my $percent_avail;
my $e614_used;
my $percent_e614_used;
my $total_size;
my $avail_size;
my @list_of_nodes;  # List of all ice nodes
my $disk_db_path = "/home/e614/public_html/private/sysman/wg_disk_db";
my $default_db_name = "diskspace.YYY.db";  # YYY gets replaced with log number 0-$num_days
my $local_node_name = "iceXXX_YYY";  # XXX gets replaced with 1-14 and YYY gets replaced with 1-60
my @global_nodes = ('home','scratch');
my @gen_names;
my @set_names;
my $low_space_threshold = 11.0;  # Percentage of free space before we highlight the entry
my $num_of_blades = 60;
my $num_of_nodes_per_blade = 14;

my $f_blocks_tot_GB= 0;
my $f_free_tot_GB =0;
my $f_free_over_tot=0;
###############################################################
# Color settings
my $color;
my $bgcolor;
my $bg_norm_color = "\"#FFFFDF\"";
my $norm_color = "\"#000000\"";
my $node_down_color = "\"#000000\"";
my $bg_node_down_color = "\"#FF7777\"";
my $low_space_color = "\"#990000\"";
my $bg_low_space_color = "\"#DDDD77\"";
my $table_header_color = "\"#221AA0\"";
my $bg_table_header_color = "\"#CCDDEE\"";

###############################################################
# Open database file and get web parameters from $ENV{QUERY_STRING}
my $mode = 0755;
my $db_name = $default_db_name;
$db_name =~ s/YYY/0/;
dbmopen(%disks,"$disk_db_path/$db_name",$mode) or die "Could not open $disk_db_path/$db_name!\n";
if($ENV{QUERY_STRING}=~'sort_free' || $ENV{QUERY_STRING}=~'low' || $ENV{QUERY_STRING}=~'down' || $ENV{QUERY_STRING} =~ m/^ice/  || $ENV{QUERY_STRING} =~ 'scratch' ) {
  $display = $ENV{QUERY_STRING};
}

###############################################################
# Print html headers and date
print header;
print start_html('Westgrid Disk Space Database');
print links_header();
  
###############################################################
# Print out information for /global/home and /global/scratch disks
# Build list of gen_names
foreach my $value (grep(/^gen\d+/,keys %disks)) {
  $value =~ /^gen(\d+)/;
  my $gen_num = $1;
  my $add = 1;
  foreach my $v (@gen_names) {
    if($v =~ /^gen$gen_num/) {
      $add = 0;
    }
  }
  if($add) {
    push(@gen_names,"gen$gen_num");
  }
}
###############################################################
# Print out information for /global/home and /global/scratch disks
# Build list of set_names
foreach my $value (grep(/^set\d+/,keys %disks)) {
  $value =~ /^set(\d+)/;
  my $set_num = $1;
  my $add = 1;
  foreach my $v (@set_names) {
    if($v =~ /^set$set_num/) {
      $add = 0;
    }
  }
  if($add) {
    push(@set_names,"set$set_num");
  }
}
if(($display !~ m/^ice/) && ($display !~ m/scratch/)) {
  print h1('Westgrid Global Disks'),
  "<b>Last update:</b>",
  # "Home: "."   Scratch:\n",
  "<br><b>Home disk info:</b> ".$disks{"e614home_update_date"}."&nbsp &nbsp <b>Scratch disk info:</b> ".$disks{"e614scratch_update_date"},
  p;


  $total_entries = 0;
  print "<TABLE border=\"1\"><TR ALIGN=\"center\" BGCOLOR=$bg_table_header_color>";
  print "<TH><FONT COLOR=$table_header_color>Disk</FONT>";
  print "<TH><FONT COLOR=$table_header_color>Status</FONT>";
  print "<TH><FONT COLOR=$table_header_color>Free (GB)</FONT>";
  print "<TH><FONT COLOR=$table_header_color>Total (GB)</FONT>";
  print "<TH><FONT COLOR=$table_header_color>Free/Total (%)</FONT>";
  print "<TH><FONT COLOR=$table_header_color>e614 Usage (GB)</FONT>";
  print "<TH><FONT COLOR=$table_header_color>e614 Usage/Total (%)</FONT>";
  
  foreach my $node_name (@global_nodes) {
    $bsize = $disks{"$node_name"."-"."f_bsize"};
    $status = $disks{"$node_name"."-"."f_status"};
    $show_entry = 1;
    if($status =~ "DOWN" || ($bsize+0) le 0) {
      if($display=~'low') {$show_entry = 0;}
      $color=$node_down_color;
      $bgcolor=$bg_node_down_color;
      $status = "DOWN";
      # Get previous information
      $total_size = blocks_to_gigabytes($disks{"$node_name"."-"."f_blocks"},$bsize);
      $avail_size = blocks_to_gigabytes($disks{"$node_name"."-"."f_bavail"},$bsize);
      $percent_avail = percentage($disks{"$node_name"."-"."f_bavail"},$disks{"$node_name"."-"."f_blocks"});
      $e614_used = $disks{"$node_name"."-"."e614usage"};
      $percent_e614_used = percentage($e614_used,$total_size);
    }
    else {  # Status must be up
      if($display=~'down') {$show_entry = 0;}
      $total_size = blocks_to_gigabytes($disks{"$node_name"."-"."f_blocks"},$bsize);
      $avail_size = blocks_to_gigabytes($disks{"$node_name"."-"."f_bavail"},$bsize);
      $percent_avail = percentage($disks{"$node_name"."-"."f_bavail"},$disks{"$node_name"."-"."f_blocks"});
      $e614_used = $disks{"$node_name"."-"."e614usage"};
      $percent_e614_used = percentage($e614_used,$total_size);
      if(($percent_avail+0.0) < $low_space_threshold) {
        $color=$low_space_color;
        $bgcolor=$bg_low_space_color;
      }
      else {
        if($display=~'low') {$show_entry = 0;}
        $color=$norm_color;
        $bgcolor=$bg_norm_color;
      }
    }
    if($show_entry) {
      $total_entries++;
      print "<TR ALIGN=\"center\" BGCOLOR=$bgcolor>";
      if($node_name=~'home'){
	print "<TH><FONT COLOR=$color>/global/$node_name/e614</FONT>";
      }
      elsif($node_name=~'scratch'){
	print "<TH><FONT COLOR=$color><A HREF=\"websummary.pl?$node_name\">/global/$node_name/twist</A></FONT>";
      }
      print "<TH><FONT COLOR=$color>".$status."</FONT>";
      print "<TH><FONT COLOR=$color>".$avail_size."</FONT>";
      print "<TH><FONT COLOR=$color>".$total_size."</FONT>";
      print "<TH><FONT COLOR=$color>".$percent_avail."</FONT>\n";
      print "<TH><FONT COLOR=$color>".$e614_used."</FONT>";
      print "<TH><FONT COLOR=$color>".$percent_e614_used."</FONT>\n";
    }
  } # foreach my $node_name (@global_nodes)

  if($total_entries le 0) {
    print "<TR ALIGN=\"center\" BGCOLOR=$bg_norm_color><TH colspan=7>Table is empty";
  }
print '</TABLE>'."\n";

# Print the information from each node
  print p,
    h1('Westgrid Local Disks'),
      "<b>Last update of Local disk info:<br> Start:</b> ".$disks{"node_update_start_date"}."&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <b>End:</b> ".$disks{"node_update_end_date"}."\n",
    p;
  $total_entries = 0;
  print "<TABLE border=\"1\"><TR ALIGN=\"center\" BGCOLOR=$bg_table_header_color>";
  if($display =~ 'sort_free') {
    print "<TH><FONT COLOR=$table_header_color><CENTER><A HREF=\"websummary.pl\">(Sort by) Disk</A></CENTER></FONT>";
  }
  else {
    print "<TH><FONT COLOR=$table_header_color>Disk</FONT>";
  }
  print "<TH><FONT COLOR=$table_header_color>Status</FONT>"; 

  $f_blocks_tot_GB = blocks_to_gigabytes($disks{"f_blocks_tot"},4096);
  $f_free_tot_GB = blocks_to_gigabytes($disks{"f_free_tot"},4096);
  $f_free_over_tot = percentage($f_free_tot_GB,$f_blocks_tot_GB);
  print "<TH><FONT COLOR=$table_header_color>Free (GB)</FONT><br><FONT COLOR=$norm_color>".$f_free_tot_GB."</FONT>";

  print "<TH><FONT COLOR=$table_header_color>Total (GB)</FONT><br><FONT COLOR=$norm_color>".$f_blocks_tot_GB."</FONT>";
  if(!$display) {
    print "<TH><FONT COLOR=$table_header_color>Free/Total (%)</FONT><br><FONT COLOR=$norm_color>".$f_free_over_tot."</FONT><br><FONT COLOR=$table_header_color><A HREF=\"websummary.pl?sort_free\">(Sort by) Free/Total (%)</A></FONT>";
  }
  else {
    print "<TH><FONT COLOR=$table_header_color>Free/Total (%)</FONT>\n";
  }
  print "<TH><FONT COLOR=$table_header_color>GENs on Local Disk<br> under <br>/data/twist/e614/tbsdata</FONT>\n";
  # Build a list of nodes
  my @array_of_free_percentage;
  for(my $blade = 1; $blade<=$num_of_blades; $blade++) {
    for(my $node = 1; $node<=$num_of_nodes_per_blade; $node++) {
      my $node_name = $local_node_name;
      $node_name =~ s/XXX/$blade/;
      $node_name =~ s/YYY/$node/;
      push(@list_of_nodes,$node_name);
      my $free = percentage($disks{"$node_name"."-"."f_bavail"},$disks{"$node_name"."-"."f_blocks"});;
      push(@array_of_free_percentage,"$free"."-"."$node_name");
    }
  }
  if($display =~ 'sort_free') {
    @array_of_free_percentage = sort {$a <=> $b} (@array_of_free_percentage);
    $#list_of_nodes = -1;  # Clear array
    foreach my $val (@array_of_free_percentage) {
      $val =~ m/.+-(.+)/;
      push(@list_of_nodes,$1);
    }
  }
  foreach my $node_name (@list_of_nodes) {
    $bsize = $disks{"$node_name"."-"."f_bsize"};
    $status = $disks{"$node_name"."-"."f_status"};
    $show_entry = 1;
    if($status =~ "DOWN" || ($bsize+0) le 0) {
      if($display=~'low') {$show_entry = 0;}
      $color=$node_down_color;
      $bgcolor=$bg_node_down_color;
      $status = "DOWN";
      # Get previous disk information
      $total_size = blocks_to_gigabytes($disks{"$node_name"."-"."f_blocks"},$bsize);
      $avail_size = blocks_to_gigabytes($disks{"$node_name"."-"."f_bavail"},$bsize);
      $percent_avail = percentage($disks{"$node_name"."-"."f_bavail"},$disks{"$node_name"."-"."f_blocks"});
    }
    else {  # Status must be up
      if($display=~'down') {$show_entry = 0;}
      $total_size = blocks_to_gigabytes($disks{"$node_name"."-"."f_blocks"},$bsize);
      $avail_size = blocks_to_gigabytes($disks{"$node_name"."-"."f_bavail"},$bsize);
      $percent_avail = percentage($disks{"$node_name"."-"."f_bavail"},$disks{"$node_name"."-"."f_blocks"});
      if(($percent_avail+0.0) < $low_space_threshold) {
        $color=$low_space_color;
        $bgcolor=$bg_low_space_color;
      }
      else {
        if($display=~'low') {$show_entry = 0;}
        $color=$norm_color;
        $bgcolor=$bg_norm_color;
      }
    }
    if($show_entry) {
      $total_entries++;
      print "<TR ALIGN=\"center\" BGCOLOR=$bgcolor>";
      print "<TH><FONT COLOR=$color><A HREF=\"websummary.pl?$node_name\">$node_name</A></FONT>";
      print "<TH><FONT COLOR=$color>".$status."</FONT>";
      print "<TH><FONT COLOR=$color>".$avail_size."</FONT>";
      print "<TH><FONT COLOR=$color>".$total_size."</FONT>";
      print "<TH><FONT COLOR=$color>".$percent_avail."</FONT>\n";
      print "<TH ALIGN=\"left\"><FONT COLOR=$color>";
      my $c=0;
      foreach my $v (@gen_names) {
	if($disks{"$node_name"."-"."$v"}) {
	  $c++;
	  print "$v ";
	  if(($c % 4) eq 0) {
	    print "<BR>";
	  }
	}
      }
      print "<BR>";
      foreach my $v (@set_names) {
	if($disks{"$node_name"."-"."$v"}) {
	  $c++;
	  print "$v ";
	  if(($c % 4) eq 0) {
	    print "<BR>";
	  }
	}
      }
      print "</FONT>\n";
    }
  }
  if($total_entries le 0) {
    print "<TR ALIGN=\"center\" BGCOLOR=$bg_norm_color><TH colspan=6>Table is empty";
  }
  print '</TABLE>'."\n";
} # if(($display !~ m/ice/) && ($display !~ 'scratch'))

elsif($display=~'scratch'){
  $total_entries = 0;
  print h2('TWIST "/global/scratch" usage breakdown'),
    p;

  my $scratch_e614usage = $disks{"scratch"."-"."e614usage"};
  my $scratch_rawdata = $disks{"scratch"."-"."rawdata"};
  my $scratch_raw = $disks{"scratch"."-"."raw"};
  my $scratch_mc = $disks{"scratch"."-"."mc"};
  my $scratch_sys_mc= $disks{"scratch"."-"."sys_mc"};
  my $scratch_sys_data = $disks{"scratch"."-"."sys_data"};
  my $scratch_stage= $disks{"scratch"."-"."stage"};


  print "<TABLE border=\"1\"><TR ALIGN=\"left\" BGCOLOR=$bg_table_header_color>";
  print "<TH ALIGN=\"center\"><FONT COLOR=$table_header_color>Total Usage</FONT>\n";
  print "<TH > <FONT COLOR=$table_header_color>Size (GB)</FONT>\n";
  print "<TR ALIGN=\"left\" BGCOLOR=$bgcolor>";
  print "<TH><FONT COLOR=$table_header_color> /global/scratch/twist</FONT>\n";
  print "<TH ALIGN=\"center\"> <FONT COLOR=black>$scratch_e614usage</FONT>\n";
  print '</TABLE>'."\n";
  print "<TABLE border=\"1\"><TR ALIGN=\"left\" BGCOLOR=$bg_table_header_color>";
  print "<TH ALIGN=\"center\"><FONT COLOR=$table_header_color>Usage Per Subdirectory</FONT>\n";
  print "<TH  ALIGN=\"center\"> <FONT COLOR=$table_header_color>Size (GB)</FONT>\n";
  print "<TR ALIGN=\"left\" BGCOLOR=$bgcolor>";
  print "<TH><FONT COLOR=$table_header_color> /global/scratch/twist/rawdata </FONT>\n";
  print "<TH  ALIGN=\"center\"> <FONT COLOR=black>$scratch_rawdata</FONT>\n";
  print "<TR ALIGN=\"left\" BGCOLOR=$bgcolor>";
  print "<TH><FONT COLOR=$table_header_color> /global/scratch/twist/raw </FONT>\n";
  print "<TH  ALIGN=\"center\"><FONT COLOR=black>$scratch_raw</FONT>\n";
  print "<TR ALIGN=\"left\" BGCOLOR=$bgcolor>";
  print "<TH><FONT COLOR=$table_header_color> /global/scratch/twist/mc </FONT>\n";
  print "<TH  ALIGN=\"center\"><FONT COLOR=black>$scratch_mc</FONT>\n";
  print "<TR ALIGN=\"left\" BGCOLOR=$bgcolor>";
  print "<TH><FONT COLOR=$table_header_color> /global/scratch/twist/stage </FONT>\n";
  print "<TH  ALIGN=\"center\"><FONT COLOR=black>$scratch_stage</FONT>\n";
  print "<TR ALIGN=\"left\" BGCOLOR=$bg_table_header_color>";
  print "<TH colspan =\"2\"><FONT COLOR=$table_header_color>/global/scratch/twist/systematics</FONT>\n";

  
  my $nsets = 0;
  my $ngens = 0;
  my $ncols = 5;

  foreach my $set (grep(/^scratch-set\d+/,keys %disks)) {
   $nsets++;
 }
  foreach my $gen (grep(/^scratch-gen\d+/,keys %disks)) {
   $ngens++;
 }

  if (($ngens >= 4) || ($nsets >= 4)){
    $ncols = ($nsets>$ngens)? $nsets:$ngens;
  }

  print "<TH BGCOLOR=$bg_table_header_color colspan=$ncols  ALIGN=\"center\"><FONT COLOR=$table_header_color> Breakdown in data \"set\" and mc \"gen\" trees  (GB) </FONT>\n"; 
  print "<TR ALIGN=\"left\" BGCOLOR=$bgcolor>";
  print "<TH><FONT COLOR=$table_header_color> /global/scratch/twist/systematics/data </FONT>\n";
  print "<TH  ALIGN=\"center\"><FONT COLOR=black>$scratch_sys_data</FONT>\n";
  foreach my $set (grep(/^scratch-set\d+/,keys %disks)) {
    chomp;
    if ($set =~ /^scratch-set(\d+)/) {
      my $set_num = $1;
      my $set_val = sprintf("%.2f",$disks{"scratch"."-set"."$set_num"});
      print "<TH ALIGN=\"center\"><FONT COLOR=$table_header_color>set$set_num</FONT><br><FONT COLOR=black>$set_val</FONT>\n";
    }
  }
  print "<TR ALIGN=\"left\" BGCOLOR=$bgcolor>";
  print "<TH><FONT COLOR=$table_header_color> /global/scratch/twist/systematics/mc </FONT>\n";
  print "<TH ALIGN=\"center\"><FONT COLOR=black>$scratch_sys_mc</FONT>\n";
  foreach my $gen (grep(/^scratch-gen\d+/,keys %disks)) {
    chomp;
    if ($gen =~ /^scratch-gen(\d+)/) {
      my $gen_num = $1;
      my $gen_val = sprintf("%.2f",$disks{"scratch"."-gen"."$gen_num"});
      print "<TH ALIGN=\"center\"><FONT COLOR=$table_header_color>gen$gen_num</FONT><br><FONT COLOR=black>$gen_val</FONT>\n";
    }
  }

 $total_entries +=6;
 
  if(0){
  }
  # Print table of gen usage
  $bgcolor = $bg_norm_color;
  $color = $norm_color;
  if($total_entries le 0) {
    print "<TR ALIGN=\"center\" BGCOLOR=$bg_norm_color><TH colspan=4>Table is empty";
  }
  print '</TABLE>'."\n";
}

# if($display !~ m/ice/)
else {  # Print out the gen and set tables for ice node
  my $node_name = $display;
  print h1("Westgrid $node_name"),
    p;
  # GEN table
  print h1("GEN Usage"),
    p;
  $total_entries = 0;
  print "<TABLE border=\"1\"><TR ALIGN=\"center\" BGCOLOR=$bg_table_header_color>";
  print "<TH><FONT COLOR=$table_header_color>GEN Name</FONT>";
  print "<TH><FONT COLOR=$table_header_color>Size on $node_name (Mb)</FONT>";
  print "<TH><FONT COLOR=$table_header_color>Total Number of Nodes</FONT>";
  print "<TH><FONT COLOR=$table_header_color>Total Size on all Local Nodes (GB)</FONT>";
  # Print table of gen usage
  $bgcolor = $bg_norm_color;
  $color = $norm_color;
  foreach my $value (sort @gen_names) {
    my $t_size = $disks{"$node_name"."-"."$value"};
    my $n = $disks{"$value"."-"."nodes"};
    $t_size = "0.0 Mb" if(!$t_size);
    my $num_of_nodes = $n =~ tr/:/:/;
    $total_entries++;
    print "<TR ALIGN=\"center\" BGCOLOR=$bgcolor>";
    print "<TH><FONT COLOR=$color>$value</FONT>";
    print "<TH><FONT COLOR=$color>".$t_size."</FONT>";
    print "<TH><FONT COLOR=$color>".$num_of_nodes."</FONT>";
    print "<TH><FONT COLOR=$color>".sprintf("%.2f",$disks{"$value"."-"."total_size"}/1024)." GB</FONT>";
  }
  if($total_entries le 0) {
    print "<TR ALIGN=\"center\" BGCOLOR=$bg_norm_color><TH colspan=4>Table is empty";
  }
  print '</TABLE>'."\n";
  # SET table
  print h1("SET Usage"),
    p;
  $total_entries = 0;
  print "<TABLE border=\"1\"><TR ALIGN=\"center\" BGCOLOR=$bg_table_header_color>";
  print "<TH><FONT COLOR=$table_header_color>SET Name</FONT>";
  print "<TH><FONT COLOR=$table_header_color>Size on $node_name (Mb)</FONT>";
  print "<TH><FONT COLOR=$table_header_color>Total Number of Nodes</FONT>";
  print "<TH><FONT COLOR=$table_header_color>Total Size on all Local Nodes (GB)</FONT>";
  # Print table of set usage
  $bgcolor = $bg_norm_color;
  $color = $norm_color;
  foreach my $value (sort @set_names) {
    my $t_size = $disks{"$node_name"."-"."$value"};
    my $n = $disks{"$value"."-"."nodes"};
    $t_size = "0.0 Mb" if(!$t_size);
    my $num_of_nodes = $n =~ tr/:/:/;
    $total_entries++;
    print "<TR ALIGN=\"center\" BGCOLOR=$bgcolor>";
    print "<TH><FONT COLOR=$color>$value</FONT>";
    print "<TH><FONT COLOR=$color>".$t_size."</FONT>";
    print "<TH><FONT COLOR=$color>".$num_of_nodes."</FONT>";
    print "<TH><FONT COLOR=$color>".sprintf("%.2f",$disks{"$value"."-"."total_size"}/1024)." GB</FONT>";
  }
  if($total_entries le 0) {
    print "<TR ALIGN=\"center\" BGCOLOR=$bg_norm_color><TH colspan=4>Table is empty";
  }
  print '</TABLE>'."\n";
}
###############################################################
# End html page
print end_html;
dbmclose(%disks) or warn "Could not close $disk_db_path/$db_name\n";
exit(0);

###############################################################
# Functions
sub blocks_to_megabytes($$) {
  my $num_blocks = shift;
  my $block_size = shift;
  my $value = $num_blocks*$block_size;
  return sprintf("%.2f",$value/1024/1024);
}

sub blocks_to_gigabytes($$) {
  my $num_blocks = shift;
  my $block_size = shift;
  my $value = $num_blocks*$block_size;
  return sprintf("%.2f",$value/1024/1024/1024);
}

sub blocks_to_terabytes($$) {
  my $num_blocks = shift;
  my $block_size = shift;
  my $value = $num_blocks*$block_size;
  return sprintf("%.2f",$value/1024/1024/1024/1024);
}

sub percentage($$) {
  my $num = shift;
  my $total = shift;
  my $value;
  if($total gt 0) {
    $value = $num/$total;
  }
  else {
    $value = 0;
  }
  return sprintf("%.1f",100.0*$value);
}

sub kbytes_to_terabytes($) {
  my $bytes = shift;
  return sprintf("%.2f",$bytes/1024/1024/1024);
}

sub kbytes_to_gigabytes($) {
  my $bytes = shift;
  return sprintf("%.2f",$bytes/1024/1024);
}

sub links_header {
  return "<CENTER><TABLE cellpadding=\"10pt\" BGCOLOR=\"#DCDCAC\"><TR>"
        ."<TD WIDTH=\"15%\"><CENTER><A HREF=\"websummary.pl\">Show All Disks</A></CENTER></TD>"
        ."<TD WIDTH=\"15%\"><CENTER><A HREF=\"websummary.pl?down\">Show Disks Down</A></CENTER></TD>"
        ."<TD WIDTH=\"15%\"><CENTER><A HREF=\"websummary.pl?low\">Show Disks with Low Freespace (<11%)</A></CENTER>"
        ."</TABLE></CENTER>\n";
}
