Index: trunk/ippMonitor/czartool/czarplot.pl
===================================================================
--- trunk/ippMonitor/czartool/czarplot.pl	(revision 34238)
+++ trunk/ippMonitor/czartool/czarplot.pl	(revision 34249)
@@ -61,16 +61,16 @@
     print "* OPTIONAL: plot histogram                  -h                          (default=off)\n";}
 if (!$timeSeries) {
-    print "* OPTIONAL: plot timeseries                 -t                          (default=on)\n";} 
+    print "* OPTIONAL: plot timeseries                 -t                          (default=on)\n";}
 if (!$magicMask) {
-    print "* OPTIONAL: plot magic mask for these times -m                          (default=off)\n";} 
+    print "* OPTIONAL: plot magic mask for these times -m                          (default=off)\n";}
 if (!$exposureId) {
-    print "* OPTIONAL: set exposure ID for magic mask  -x                          (default=none)\n";} 
+    print "* OPTIONAL: set exposure ID for magic mask  -x                          (default=none)\n";}
 if (!$rate) {
-    print "* OPTIONAL: plot histogram of rate          -r                          (default=off)\n";} 
+    print "* OPTIONAL: plot histogram of rate          -r                          (default=off)\n";}
 if (!$log) {
     $log = 0;
     print "* OPTIONAL: use log plots                   -g                          (default=$log)\n";}
 if (!$nebulous) {
-    print "* OPTIONAL: plot nebulous disk space        -n                          (default=off)\n";} 
+    print "* OPTIONAL: plot nebulous disk space        -n                          (default=off)\n";}
 if (!$label) {
     $label = "all_stdscience_labels";
@@ -79,18 +79,18 @@
     print "* OPTIONAL: choose a stage                  -s <chip|cam|warp|etc>      (default=none)\n";}
 if (!$timeinpast) {
-    print "* OPTIONAL: choose time interval in past    -p <'1 hour'|'1 day'|etc>   (default=none\n";} 
+    print "* OPTIONAL: choose time interval in past    -p <'1 hour'|'1 day'|etc>   (default=none\n";}
 if (!$rateInterval) {
-    print "* OPTIONAL: time interval for rate plot     -i <'1 hour'|'1 day'|etc>   (default=depends on time frame)\n";} 
+    print "* OPTIONAL: time interval for rate plot     -i <'1 hour'|'1 day'|etc>   (default=depends on time frame)\n";}
 if (!$begin) {
-    print "* OPTIONAL: choose a begin time             -b <datetime>               (default=18:00)\n";} 
+    print "* OPTIONAL: choose a begin time             -b <datetime>               (default=18:00)\n";}
 if (!$end) {
-    print "* OPTIONAL: choose an end time              -e <datetime>               (default=now)\n";} 
+    print "* OPTIONAL: choose an end time              -e <datetime>               (default=now)\n";}
 if (!$day) {
-    print "* OPTIONAL: choose a single day to plot     -d <date>                   (default=today)\n";} 
+    print "* OPTIONAL: choose a single day to plot     -d <date>                   (default=today)\n";}
 if (!$path) {
     print "* OPTIONAL: choose an output location       -o <path>                   (default=none)\n";
-} 
+}
 if (!$psps) {
-    print "* OPTIONAL: plot ippToPsps stages           -u                          (default=off)\n";} 
+    print "* OPTIONAL: plot ippToPsps stages           -u                          (default=off)\n";}
 print "*\n*******************************************************************************\n";
 
@@ -110,5 +110,5 @@
 my $newDayTime =  $config->getMetricsStartTime();
 
-my $plotter = undef; 
+my $plotter = undef;
 if ($savingToFile) {
 
@@ -122,5 +122,5 @@
 if ($psps) {$plotter->setIppToPspsMode();}
 
-# if a single day has been chosen 
+# if a single day has been chosen
 if($day) {
 
@@ -134,5 +134,5 @@
         # plots should span 24 housr from previous day
         my $dayBefore = $czarDb->subtractInterval($day, "1 DAY");
-                
+
         $begin = "$dayBefore $newDayTime";
         $end = "$day $newDayTime";
@@ -147,5 +147,5 @@
         my $yesterday = $czarDb->subtractInterval($today, "1 DAY");
 
-        
+
         if ($timeinpast) {$begin = $czarDb->subtractInterval($end, $timeinpast);}
         elsif ($czarDb->isBefore($end, "$today $newDayTime")) {$begin = "$yesterday $newDayTime";}
@@ -166,6 +166,11 @@
 
 if ($histogram) {$plotter->createHistogram($label, $begin, $end);}
-if ($nebulous && $timeSeries) {$plotter->plotStorageTimeSeries($begin, $end);}
-elsif ($nebulous) {$plotter->plotDiskUsageHistogram();}
+if ($nebulous && $timeSeries) {
+    $plotter->plotStorageTimeSeries($begin, $end);
+}
+elsif ($nebulous) {
+    $plotter->plotDiskUsageHistogram();
+    $plotter->plotDiskUsageHistogramLarge();
+}
 if ($magicMask) {
 
Index: trunk/ippMonitor/czartool/czarpoll.pl
===================================================================
--- trunk/ippMonitor/czartool/czarpoll.pl	(revision 34238)
+++ trunk/ippMonitor/czartool/czarpoll.pl	(revision 34249)
@@ -30,20 +30,20 @@
 
 my $config = new czartool::Config();
-my $czarDb = $config->getCzarDbInstance(); 
+my $czarDb = $config->getCzarDbInstance();
 my $gpc1Db = $config->getGpc1Instance;
 my $nebulous = new czartool::Nebulous($czarDb);
 my $pantasks = new czartool::Pantasks();
-my $plotter = czartool::Plotter->new_file($config, $config->getGnuplotPath(), $save_temps); 
+my $plotter = czartool::Plotter->new_file($config, $config->getGnuplotPath(), $save_temps);
 
 
 my @stages = (
-        "chip", 
-        "cam", 
-        "fake", 
-        "warp", 
-        "stack", 
-        "staticsky", 
-        "diff", 
-        "dist", 
+        "chip",
+        "cam",
+        "fake",
+        "warp",
+        "stack",
+        "staticsky",
+        "diff",
+        "dist",
         "pub",
         "chipbackground");
@@ -65,5 +65,5 @@
 ###########################################################################
 #
-# Updates the dates from pantasks for all interested servers 
+# Updates the dates from pantasks for all interested servers
 #
 ###########################################################################
@@ -78,5 +78,5 @@
 
         my @dates = @{$pantasks->getDates($server)};
-        if (@dates) { 
+        if (@dates) {
 
             $czarDb->updateServerDates($server, \@dates);
@@ -91,5 +91,5 @@
 ###########################################################################
 #
-# Updates the labels from pantasks for all interested servers 
+# Updates the labels from pantasks for all interested servers
 #
 ###########################################################################
@@ -103,5 +103,5 @@
 
         my @labels = @{$pantasks->getLabels($server)};
-        if (@labels) { 
+        if (@labels) {
 
             $czarDb->updateCurrentLabels($server, \@labels);
@@ -116,5 +116,5 @@
 ###########################################################################
 #
-# Updates pantasks server status TODO should really get info for all servers at once 
+# Updates pantasks server status TODO should really get info for all servers at once
 #
 ###########################################################################
@@ -136,5 +136,5 @@
 ###########################################################################
 #
-# Polls with provided period (seconds) 
+# Polls with provided period (seconds)
 #
 ###########################################################################
@@ -184,9 +184,9 @@
                 # create metrics for last 24 hours
                 print "* Creating metrics for last 24 hours\n";
-                my $dayMetrics = new czartool::DayMetrics($config, 1, 0, $today); 
+                my $dayMetrics = new czartool::DayMetrics($config, 1, 0, $today);
                 $dayMetrics->writeHTML();
 
                 # now update metrics index page
-                my $metricsIndex = new czartool::MetricsIndex($config, 1, 0); 
+                my $metricsIndex = new czartool::MetricsIndex($config, 1, 0);
                 $metricsIndex->writeHTML();
 
@@ -210,4 +210,5 @@
         $plotter->plotStorageTimeSeries($czarDb->subtractInterval($begin, "1 WEEK") , $end);
         $plotter->plotDiskUsageHistogram();
+        $plotter->plotDiskUsageHistogramLarge();
         updateServerStatus();
 
@@ -269,10 +270,10 @@
     $czarDb->getCurrentIppToPspsLabels($begin, $end, \$ippToPspsLabels);
     $plotter->setIppToPspsMode();
-    
+
     # create ippToPsps labels
     foreach $stage (@ippToPspsStages) {
         foreach $row ( @{$ippToPspsLabels} ) {
             my ($label) = @{$row};
-            
+
             chomp($label);
             $plotter->createTimeSeries($label, $stage, $begin, $end, 1, 0, 1);
Index: trunk/ippMonitor/czartool/czartool/Plotter.pm
===================================================================
--- trunk/ippMonitor/czartool/czartool/Plotter.pm	(revision 34238)
+++ trunk/ippMonitor/czartool/czartool/Plotter.pm	(revision 34249)
@@ -666,4 +666,49 @@
         "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" .
         "set style fill solid 1.00 border -1;" .
+        "set key center top;" .
+        "set style histogram rowstacked;" .
+        "set style data histograms;" .
+        "set ylabel \"Space (TB)\";" .
+        "set xtic rotate by -90 scale 0;" .
+        "plot '".$tmpFile->filename."' " .
+        "using 2:xtic(1) t \"Used\" lt 7," .
+        "'' using 3 t \"Over $limit% used\" lt 1," .
+        "'' using 4 t \"Unavailable\" fs solid 0.50 lt -1 ," .
+        "'' using 5 t \"Free\" lt 2," .
+        "'' using 6 notitle fs solid 0.50 lt -1" .
+        ";" .
+
+        "\n";
+    close GP;
+}
+
+###########################################################################
+#
+# Plots disk usage across cluster as a stacked histogram
+#
+###########################################################################
+sub plotDiskUsageHistogramLarge {
+    my ($self) = @_;
+
+    my $prefix = $self->{_outputPath} ? $self->{_outputPath} : "."; # TODO should be function for this
+        my $outputFile = "$prefix/czarplot_hosts_space_large.png";
+    my $limit = 97.0;
+    my $tmpFile = File::Temp->new( TEMPLATE => "czarplot_hosts_space.XXXXX", DIR => '/tmp', SUFFIX => 'dat');
+    $self->{_czarDb}->createHostsData($limit, $tmpFile);
+
+    my $totalUsed = $self->{_czarDb}->getTotalClusterStorageAsPercentage();
+
+    my $totalPercent = sprintf("%.1f%%", $totalUsed);
+
+    open (GP, "|$GNUPLOT -persist") or die "no gnuplot";
+    use FileHandle;
+    GP->autoflush(1);
+
+    if ($self->{_outputFormat} ne "X11") {print GP "set output \"$outputFile\";";}
+    print GP
+        "set term $self->{_outputFormat} size 1280,1024;" .
+        "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" .
+        "set style fill solid 1.00 border -1;" .
+        "set bmarg 5; " .
         "set key center top;" .
         "set style histogram rowstacked;" .
Index: trunk/ippMonitor/raw/czartool_getplot.php
===================================================================
--- trunk/ippMonitor/raw/czartool_getplot.php	(revision 34238)
+++ trunk/ippMonitor/raw/czartool_getplot.php	(revision 34249)
@@ -28,4 +28,6 @@
 else if ($type=="s")
 $filePath = "$path/czarplot_hosts_space.png";
+else if ($type=="sl")
+$filePath = "$path/czarplot_hosts_space_large.png";
 else if ($type=="st")
 $filePath = "$path/czarplot_cluster.png";
Index: trunk/ippMonitor/raw/czartool_labels.php
===================================================================
--- trunk/ippMonitor/raw/czartool_labels.php	(revision 34238)
+++ trunk/ippMonitor/raw/czartool_labels.php	(revision 34249)
@@ -141,5 +141,5 @@
  # storage plot
 echo "<br>";
- echo "<img src=\"czartool_getplot.php?type=s\"><br>";
+ echo "<a href=\"czartool_getplot.php?type=sl\"><img title=\"Click to enlarge me\" src=\"czartool_getplot.php?type=s\"></a><br>";
  # storage timeseries
 echo "<br>";
