Index: trunk/tools/czartool/CzarDb.pm
===================================================================
--- trunk/tools/czartool/CzarDb.pm	(revision 29078)
+++ trunk/tools/czartool/CzarDb.pm	(revision 29114)
@@ -242,8 +242,10 @@
 ###########################################################################
 sub createTimeSeriesData {
-    my ($self, $label, $stage, $fromTime, $toTime, $minX, $maxX, $minY, $maxY, $timeDiff) = @_;
-
-    my $dataFile = "/tmp/czarplot_gnuplot_".$label."_".$stage."_t.dat";
-    open (GNUDAT, ">$dataFile");
+    my ($self, $label, $stage, $fromTime, $toTime, $minX, $maxX, $minY, $maxY, $timeDiff, $dataFileLin, $dataFileLog) = @_;
+
+    ${$dataFileLin} = "/tmp/czarplot_gnuplot_lin_".$label."_".$stage."_t.dat";
+    ${$dataFileLog} = "/tmp/czarplot_gnuplot_log_".$label."_".$stage."_t.dat";
+    open (GNUDATLIN, ">${$dataFileLin}");
+    open (GNUDATLOG, ">${$dataFileLog}");
 
     my $query = $self->{_db}->prepare(<<SQL);
@@ -259,5 +261,5 @@
 SQL
 
-    if (!$query->execute) {return undef;}
+    if (!$query->execute) {return 0;}
 
     my $minProcessed = undef;
@@ -265,5 +267,5 @@
     ($minProcessed, ${$maxY}, ${$minY}, ${$maxX}, ${$minX}, ${$timeDiff}) = $query->fetchrow_array();
 
-    if (!defined $minProcessed) {return undef;}
+    if (!defined $minProcessed) {return 0;}
 
     $query = $self->{_db}->prepare(<<SQL);
@@ -280,12 +282,19 @@
     # loop round results
     while (my @row = $query->fetchrow_array()) {
-
         my ($timestamp, $pending, $faults, $processed) = @row;
+
+        my $processedLog = log($processed + 1);
+        my $pendingLog = log($pending + 1);
+        my $faultsLog = log($faults + 1);
+
     #    print  "'$timestamp' '$pending' '$faults' '$processed'\n";
-        print GNUDAT "$timestamp $pending $faults $processed\n";
-    }
-    close(GNUDAT);
-
-    return $dataFile;
+        print GNUDATLIN "$timestamp $pending $faults $processed\n";
+        print GNUDATLOG "$timestamp $pendingLog $faultsLog $processedLog\n";
+    }
+
+    close(GNUDATLIN);
+    close(GNUDATLOG);
+
+    return 1;
 }
 
