Changeset 29124 for branches/eam_branches/ipp-20100823/tools/roboczar.pl
- Timestamp:
- Sep 7, 2010, 9:16:10 AM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100823
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tools/roboczar.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100823
-
branches/eam_branches/ipp-20100823/tools/roboczar.pl
r28926 r29124 11 11 use czartool::Pantasks; 12 12 use czartool::Nebulous; 13 use czartool::Czarplot; 13 use czartool::Plotter; 14 use czartool::Burntool; 14 15 15 16 my $period = 60; … … 26 27 my $nebulous = new czartool::Nebulous($czarDb); 27 28 my $pantasks = new czartool::Pantasks(); 28 my $czarplot = new czartool::Czarplot($czarDb, "%Y%m%d-%H%M%S", "png font \"/usr/share/fonts/corefonts/arial.ttf\" 8", "/tmp", $save_temps); # TODO hardcoded font path 29 my $plotter = new czartool::Plotter($czarDb, "%Y%m%d-%H%M%S", "png font \"/usr/share/fonts/corefonts/arial.ttf\" 8", "/tmp", $save_temps); # TODO hardcoded font path 30 my $burntool = new czartool::Burntool(); 31 29 32 $czarDb->setDateFormat("%Y%m%d-%H%i%s"); 30 33 31 my @stages = (" chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist");34 my @stages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist"); 32 35 33 36 … … 101 104 my $priority = undef; 102 105 my $newState = undef; 106 my $nsStatus = undef; 103 107 104 108 while (1) { 105 109 106 110 # sort out times 107 $begin = strftime('%Y-%m-%d 0 7:00',localtime);111 $begin = strftime('%Y-%m-%d 06:35',localtime); 108 112 $end = $czarDb->getNowTimestamp(); 109 113 … … 112 116 $begin = $czarDb->subtractInterval($begin, "1 DAY"); 113 117 } 118 119 # check nightly science status 120 print "* Checking nightly science status\n"; 121 if (!$pantasks->getNightlyScienceStatus(\$nsStatus)) {$nsStatus = "Unknown";} 122 $czarDb->updateNightlyScience($nsStatus); 114 123 115 124 # check nebulous 116 125 print "* Checking Nebulous\n"; 117 126 $nebulous->updateClusterSpaceInfo(); 118 $ czarplot->plotDiskUsageHistogram();127 $plotter->plotDiskUsageHistogram(); 119 128 updateServerStatus(); 120 129 … … 177 186 178 187 chomp($label); 179 $ czarplot->createTimeSeries($label, $stage, $begin, $end);188 $plotter->createLogAndLinearTimeSeries($label, $stage, $begin, $end); 180 189 } 181 190 } … … 185 194 my ($label) = @{$row}; 186 195 187 $ czarplot->createTimeSeries($label, undef, $begin, $end);188 $ czarplot->createHistogram($label, $begin, $end);196 $plotter->createLogAndLinearTimeSeries($label, undef, $begin, $end); 197 $plotter->createHistogram($label, $begin, $end); 189 198 190 199 #routineChecks($label, "1 HOUR"); 191 200 } 192 $ czarplot->createTimeSeries("all_".$server."_labels", undef, $begin, $end);193 $ czarplot->createHistogram("all_".$server."_labels", $begin, $end);201 $plotter->createLogAndLinearTimeSeries("all_".$server."_labels", undef, $begin, $end); 202 $plotter->createHistogram("all_".$server."_labels", $begin, $end); 194 203 foreach $stage (@stages) { 195 204 196 $ czarplot->createTimeSeries("all_".$server."_labels", $stage, $begin, $end); # TODO must be a neater way...205 $plotter->createLogAndLinearTimeSeries("all_".$server."_labels", $stage, $begin, $end); # TODO must be a neater way... 197 206 } 198 207 } … … 233 242 chomp($label); 234 243 235 $new = $gpc1Db->countExposures($label, $stage, $newState); 236 $full = $gpc1Db->countExposures($label, $stage, "full"); 237 $faults = $gpc1Db->countFaults($label, $stage, $newState); 238 244 if ($stage eq "burntool") { 245 246 if ($labelServer eq "stdscience") { 247 248 $burntool->getPendingAndProcessed($label, \$new, \$full); 249 $faults = 0; 250 } 251 else { $new = $full = $faults = 0;} 252 } 253 else { 254 255 $new = $gpc1Db->countExposures($label, $stage, $newState); 256 $full = $gpc1Db->countExposures($label, $stage, "full"); 257 $faults = $gpc1Db->countFaults($label, $stage, $newState); 258 } 239 259 #printf("%s %s, %s, %d, %d\n", $labelServer, $label, $stage, $new, $faults); 240 260 $totalNew += $new;
Note:
See TracChangeset
for help on using the changeset viewer.
