Index: /trunk/tools/czarplot.pl
===================================================================
--- /trunk/tools/czarplot.pl	(revision 29374)
+++ /trunk/tools/czarplot.pl	(revision 29375)
@@ -22,4 +22,6 @@
 my $histogram = undef;
 my $timeSeries = undef;
+my $rate = undef;
+my $showCleanup = undef;
 my $nebulous = undef;
 my $savingToFile = undef;
@@ -33,8 +35,10 @@
         "begin|b=s" => \$begin,
         "end|e=s" => \$end,
-        "day|d=s" => \$day,
+        "day|y=s" => \$day,
         "output|o=s" => \$path,
         "histogram|h" => \$histogram,
         "nebulous|n" => \$nebulous,
+        "cleanup|c" => \$showCleanup,
+        "rate|r" => \$rate,
         "timeseries|t" => \$timeSeries,
         "verbose|v" => \$verbose,
@@ -53,4 +57,9 @@
 if (!$timeSeries) {
     print "* OPTIONAL: plot timeseries                 -t                          (default=on)\n";} 
+if (!$rate) {
+    print "* OPTIONAL: plot timeseries of rate         -r                          (default=off)\n";} 
+if (!$showCleanup) {
+    $showCleanup = 0;
+    print "* OPTIONAL: include cleanup in timeseries   -c                          (default=$showCleanup)\n";} 
 if (!$log) {
     $log = 0;
@@ -70,5 +79,5 @@
     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     -y <date>                   (default=today)\n";} 
 if (!$path) {
     print "* OPTIONAL: choose an output location       -o <path>                   (default=none)\n";
@@ -97,6 +106,8 @@
 # sort out times
 if($day) {
+
+    # day plots should run from about 6:30am until midnight
+    $begin =  "$day 06:35";
     $end = "$day 23:59";
-    $begin =  "$day 06:35";
 }
 else {
@@ -111,5 +122,11 @@
 my $diskUsage = 1; # TODO
 
-if (!$nebulous && $timeSeries) {$plotter->createTimeSeries($label, $stage, $begin, $end, $log);}
+if ($rate) {
+
+    if (!$interval) {$interval = "1 HOUR";}
+    $plotter->createRateTimeSeries($label, $stage, $begin, $end, $interval, $log);
+    exit;
+}
+if (!$nebulous && $timeSeries) {$plotter->createTimeSeries($label, $stage, $begin, $end, $log, $showCleanup);}
 if ($histogram) {$plotter->createHistogram($label, $begin, $end);}
 if ($nebulous && $timeSeries) {$plotter->plotStorageTimeSeries($begin, $end);}
