Index: /branches/ccl_branches/ipp-20190806/ippMonitor/czartool/czarpoll.pl
===================================================================
--- /branches/ccl_branches/ipp-20190806/ippMonitor/czartool/czarpoll.pl	(revision 41022)
+++ /branches/ccl_branches/ipp-20190806/ippMonitor/czartool/czarpoll.pl	(revision 41023)
@@ -272,4 +272,5 @@
     my $newDayTime = $config->getMetricsStartTime();
     my $lastDayDailyTasks = "2010-01-01";
+    my $checkneb = 0; # 1 for nebulous, 0 for localhost
 
     # main polling loop
@@ -287,9 +288,9 @@
         if($timediff > 120.) { 
             print "There is no recent Czarpoll iteration\n";
-            print "*Updating database entries*\n";
+            print "* Updating database entries*\n";
             $dbupdate = 1;
         } else {
             print "There is a recent Czarpoll iteration already made ($timediff sec ago)\n";
-            print "*Skipping database queries and entries*\n";
+            print "* Skipping database queries and entries*\n";
             $dbupdate = 0;
         }
@@ -328,6 +329,6 @@
                 print "* Performing database cleanup\n";
                 $czarDb->cleanupDateRange($yesterday, $yesterday, $config->getCzarCleanupInterval());
-                #print "* Optimizing the database\n";
-                #$czarDb->optimize();
+                print "* Optimizing the database\n";
+                $czarDb->optimize();
                 $lastDayDailyTasks = $yesterday;
             }
@@ -344,10 +345,13 @@
 
         # check nebulous
-        print "* Checking Nebulous\n";
-        if($dbupdate == 1) {$nebulous->updateClusterSpaceInfo();}
-        $plotter0->plotStorageTimeSeries($czarDb->subtractInterval($begin, "1 WEEK") , $end);
-        $plotter0->plotDiskUsageHistogram();
-        $plotter0->plotDiskUsageHistogramLarge();
-        if($dbupdate == 1) {updateServerStatus();}
+       if($checkneb == 1){
+            print "* Checking Nebulous\n";
+            if($dbupdate == 1) {$nebulous->updateClusterSpaceInfo();}
+            $plotter0->plotStorageTimeSeries($czarDb->subtractInterval($begin, "1 WEEK") , $end);
+            $plotter0->plotDiskUsageHistogram();
+            $plotter0->plotDiskUsageHistogramLarge();
+            if($dbupdate == 1) {updateServerStatus();}
+       }
+       else {print "* Locahost, so no checking nebulous\n";}
 
         # check pantasks dates
