Index: branches/eam_branches/ipp-20101205/tools/roboczar.pl
===================================================================
--- branches/eam_branches/ipp-20101205/tools/roboczar.pl	(revision 29959)
+++ branches/eam_branches/ipp-20101205/tools/roboczar.pl	(revision 30446)
@@ -7,4 +7,5 @@
 
 # local classes
+use czartool::Config;
 use czartool::CzarDb;
 use czartool::Gpc1Db;
@@ -15,14 +16,8 @@
 use czartool::StageMetrics;
 
-my $czarDbName = "czardb"; # TODO variables for other Db stuff, host etc
 my $save_temps = 0;
 
-GetOptions (
-        "dbname|d=s" => \$czarDbName,
-        );
-
-my $czarDb = new czartool::CzarDb($czarDbName, "ippdb01", "ipp", "ipp", 0, $save_temps); # TODO last arg here is save_temps, should get as arg
-
-$czarDb->setDateFormat("%Y%m%d-%H%i%s");
+my $config = new czartool::Config();
+my $czarDb = $config->getCzarDbInstance();
 
 my @stages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist"); # TODO get from Pantasks
@@ -41,14 +36,14 @@
     $message = "";
 
-    if (anyStoppedServers("20 MINUTE", \$serversMessage)) {
+    if (anyStoppedServers($config->getRoboczarServerInterval(), \$serversMessage)) {
 
         $message .= "\n\n" . $serversMessage;
         $anythingToReport = 1;
     }
-    if (anyStuckStages("2 HOUR", \$stuckMessage)) {
+#    if (anyStuckStages("2 HOUR", \$stuckMessage)) {
 
-        $message .= "\n\n" . $stuckMessage;
-        $anythingToReport = 1;
-    }
+ #       $message .= "\n\n" . $stuckMessage;
+  #      $anythingToReport = 1;
+   # }
 
     if ($anythingToReport && $message ne $lastMessage) {
@@ -56,6 +51,5 @@
 print "\n\n$message\n\n";
 
-        sendEmail(
-                "ps-ipp-ops\@ifa.hawaii.edu", 
+        sendEmail($config->getRoboczarEmail(),
                 "Roboczar warnings", 
                 "$message\n");
@@ -82,5 +76,5 @@
     my $anyStuckStages = 0;
 
-    # exception - we don't care if burntool is stalled before 6:30am
+    # exception - we don't care if burntool is stalled before 6:30am TODO we do now
     my $burntime = strftime('%Y-%m-%d 06:35', localtime);
     my $worryAboutBurntool = $czarDb->isBefore($burntime, $end);
