Changeset 32851 for branches/eam_branches/ipp-20111122/ippMonitor
- Timestamp:
- Dec 2, 2011, 11:44:07 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20111122/ippMonitor
- Files:
-
- 9 edited
- 1 copied
-
. (modified) (1 prop)
-
Makefile.in (modified) (1 diff)
-
czartool/czarplot.pl (modified) (8 diffs)
-
czartool/czarpoll.pl (modified) (2 diffs)
-
czartool/czartool/CzarDb.pm (modified) (7 diffs)
-
czartool/czartool/Pantasks.pm (modified) (1 diff)
-
czartool/czartool/Plotter.pm (modified) (14 diffs)
-
raw/czartool_ipptopsps.php (copied) (copied from trunk/ippMonitor/raw/czartool_ipptopsps.php )
-
raw/czartool_labels.php (modified) (4 diffs)
-
raw/ipp.imfiles.dat (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/ippMonitor
- Property svn:mergeinfo changed
/trunk/ippMonitor (added) merged: 32760-32763,32765-32769,32775,32782-32784,32790,32796-32797,32818
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20111122/ippMonitor/Makefile.in
r31816 r32851 60 60 $(DESTWWW)/czartool_getplot.php \ 61 61 $(DESTWWW)/czartool_exposures.php \ 62 $(DESTWWW)/czartool_ipptopsps.php \ 62 63 $(DESTWWW)/histogram.php \ 63 64 $(DESTWWW)/show_and_delete_image.php \ -
branches/eam_branches/ipp-20111122/ippMonitor/czartool/czarplot.pl
r32325 r32851 27 27 my $nebulous = undef; 28 28 my $savingToFile = undef; 29 my $analysis = undef;30 29 my $exposureId = undef; 31 30 my $log = undef; 31 my $psps = undef; 32 32 33 33 GetOptions ( … … 45 45 "nebulous|n" => \$nebulous, 46 46 "rate|r" => \$rate, 47 "analysis|a" => \$analysis,48 47 "timeseries|t" => \$timeSeries, 49 48 "verbose|v" => \$verbose, 50 49 "log|g" => \$log, 50 "psps|u" => \$psps, 51 51 ); 52 52 … … 58 58 print "* UNKNKOWN: option @ARGV\n"; 59 59 } 60 if ($analysis && !$stage) {61 $quit = 1;62 print "* REQUIRED: choose a stage for analsis -s <chip|cam|warp|etc> (default=none)\n";}63 60 if (!$histogram) { 64 61 print "* OPTIONAL: plot histogram -h (default=off)\n";} … … 71 68 if (!$rate) { 72 69 print "* OPTIONAL: plot histogram of rate -r (default=off)\n";} 73 if (!$analysis) {74 $analysis = 0;75 print "* OPTIONAL: include analysis -a (default=$analysis)\n";}76 70 if (!$log) { 77 71 $log = 0; … … 97 91 print "* OPTIONAL: choose an output location -o <path> (default=none)\n"; 98 92 } 93 if (!$psps) { 94 print "* OPTIONAL: plot ippToPsps stages -u (default=off)\n";} 99 95 print "*\n*******************************************************************************\n"; 100 96 … … 104 100 105 101 # default values 106 if (!$rate && !$magicMask && !$nebulous && !$histogram && !$ analysis && !$timeSeries) {$timeSeries = 1;}102 if (!$rate && !$magicMask && !$nebulous && !$histogram && !$timeSeries) {$timeSeries = 1;} 107 103 if (!$verbose) {$verbose = 0;} 108 104 if (!$save_temps) {$save_temps = 0;} … … 123 119 $plotter = czartool::Plotter->new_display($config, $save_temps); 124 120 } 121 122 if ($psps) {$plotter->setIppToPspsMode();} 125 123 126 124 # if a single day has been chosen … … 177 175 } 178 176 179 if($analysis) {180 181 my $stageMetrics = new czartool::StageMetrics($stage, $label, $begin, $end);182 if ($czarDb->runAnalysis($stageMetrics)) {$stageMetrics->printMe();}183 } -
branches/eam_branches/ipp-20111122/ippMonitor/czartool/czarpoll.pl
r32213 r32851 37 37 38 38 39 my @stages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist", "pub"); 40 39 my @stages = ( 40 "burntool", 41 "chip", 42 "cam", 43 "fake", 44 "warp", 45 "stack", 46 "diff", 47 "magic", 48 "magicDS", 49 "dist", 50 "pub"); 51 52 my @ippToPspsStages = ( 53 "processed", 54 "loaded_to_datastore", 55 "loaded_to_ODM", 56 "merge_worthy", 57 "deleted_datastore", 58 "deleted_dxlayer", 59 "merged", 60 "deleted_local"); 61 62 my @allStages = (@stages, @ippToPspsStages); 41 63 42 64 timePoll($period); … … 244 266 print "* Generating plots\n"; 245 267 268 # get ippToPsps labels 269 my $ippToPspsLabels = undef; 270 $czarDb->getCurrentIppToPspsLabels($begin, $end, \$ippToPspsLabels); 271 $plotter->setIppToPspsMode(); 272 273 # create ippToPsps labels 274 foreach $stage (@ippToPspsStages) { 275 foreach $row ( @{$ippToPspsLabels} ) { 276 my ($label) = @{$row}; 277 278 chomp($label); 279 $plotter->createTimeSeries($label, $stage, $begin, $end, 1, 0, 1); 280 } 281 } 282 283 # create plots for each label for all stages for ippToPsps 284 foreach $row ( @{$ippToPspsLabels} ) { 285 my ($label) = @{$row}; 286 287 $plotter->createTimeSeries($label, undef, $begin, $end, 1, 1, 1); 288 } 289 290 246 291 # create plots for each label for each stage 292 $plotter->setStandardMode(); 247 293 foreach $stage (@stages) { 248 294 foreach $row ( @{$rows} ) { -
branches/eam_branches/ipp-20111122/ippMonitor/czartool/czartool/CzarDb.pm
r32735 r32851 8 8 use File::Temp; 9 9 10 my @stages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist", "pub"); # TODO put elsewhere 10 my @stages = ( 11 "burntool", 12 "chip", 13 "cam", 14 "fake", 15 "warp", 16 "stack", 17 "diff", 18 "magic", 19 "magicDS", 20 "dist", 21 "pub"); # TODO put elsewhere 22 23 my @ippToPspsStages = ( 24 "processed", 25 "loaded_to_datastore", 26 "loaded_to_ODM", 27 "merge_worthy", 28 "deleted_datastore", 29 "deleted_dxlayer", 30 "merged", 31 "deleted_local"); 32 33 my @allStages = (@stages, @ippToPspsStages); 11 34 12 35 use base 'czartool::MySQLDb'; … … 33 56 ########################################################################### 34 57 # 35 # Gets current_labels table 58 # Gets current ippToPsps labels 59 # 60 ########################################################################### 61 sub getCurrentIppToPspsLabels { 62 my ($self, $begin, $end, $labels) = @_; 63 64 my $query = $self->{_db}->prepare(<<SQL); 65 66 SELECT DISTINCT label 67 FROM processed 68 WHERE timestamp >= '$begin' 69 AND timestamp <= '$end' 70 SQL 71 72 if (!$query->execute) {return 0;} 73 74 ${$labels} = $query->fetchall_arrayref(); 75 76 return 1; 77 } 78 79 ########################################################################### 80 # 81 # Gets current labels from the current_labels table 36 82 # 37 83 ########################################################################### … … 672 718 # times 673 719 $timeSep = $self->diffTimesInSecs($thisTimestamp, $lastTimestamp); 720 if ($timeSep == 0) {$timeSep = 1;}; # HACK to prevent divide-by-zero 721 674 722 $middleTime = $self->getMiddleTime($lastTimestamp, $thisTimestamp); 675 723 $formattedMiddleTimestamp = $self->getFormattedDate($middleTime); … … 681 729 # added, and store value to subtract from linear value below. If > 1000 682 730 # processed per hour, then it must be wrong 683 if (($thisProcessed - $lastProcessed)/( ($timeSep/3600)+1) > 1000) {731 if (($thisProcessed - $lastProcessed)/($timeSep/3600) > 1000) { 684 732 $positiveJump = $thisProcessed - $lastProcessed; 685 733 } … … 701 749 702 750 # calculate first derivative in units of images per hour 703 $derivPending = $diffPending/($timeSep/3600 +1);704 $derivFaults = $diffFaults/($timeSep/3600 +1);705 $derivProcessed = $diffProcessed/($timeSep/3600 +1);751 $derivPending = $diffPending/($timeSep/3600); 752 $derivFaults = $diffFaults/($timeSep/3600); 753 $derivProcessed = $diffProcessed/($timeSep/3600); 706 754 707 755 } … … 1107 1155 my $stage = undef; 1108 1156 $totalDeleted = 0; 1109 foreach $stage (@ stages) {1157 foreach $stage (@allStages) { 1110 1158 1111 1159 if (!$self->getLabelsInThisTimePeriod($stage, $fromTime, $toTime, \$labels)) {next;} … … 1213 1261 1214 1262 my $stage = undef; 1215 foreach $stage (@ stages) {1263 foreach $stage (@allStages) { 1216 1264 1217 1265 $self->optimizeTable($stage); -
branches/eam_branches/ipp-20111122/ippMonitor/czartool/czartool/Pantasks.pm
r32102 r32851 10 10 "addstarlap", 11 11 "cleanup", 12 "deepstack", 12 13 "detrend", 13 14 "distribution", -
branches/eam_branches/ipp-20111122/ippMonitor/czartool/czartool/Plotter.pm
r32093 r32851 10 10 use czartool::Config; 11 11 12 my @allStages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist", "pub"); 12 my @allStages = ( 13 "burntool", 14 "chip", 15 "cam", 16 "fake", 17 "warp", 18 "stack", 19 "diff", 20 "magic", 21 "magicDS", 22 "dist", 23 "pub"); 24 25 my @allIppToPspsStages = ( 26 "processed", 27 "loaded_to_datastore", 28 "loaded_to_ODM", 29 "merge_worthy", 30 "deleted_datastore", 31 "deleted_dxlayer", 32 "merged", 33 "deleted_local"); 34 13 35 14 36 ########################################################################### … … 75 97 ########################################################################### 76 98 # 99 # Sets plotter to use standard IPP mode, i.e. chip, cam etc 100 # 101 ########################################################################### 102 sub setStandardMode { 103 my ($self) = @_; 104 105 $self->{allStages} = \@allStages; 106 } 107 108 ########################################################################### 109 # 110 # Sets plotter to use ippToPsps mode, i.e. processed, loaded_to_datastore etc 111 # 112 ########################################################################### 113 sub setIppToPspsMode { 114 my ($self) = @_; 115 116 $self->{allStages} = \@allIppToPspsStages; 117 } 118 119 ########################################################################### 120 # 77 121 # Some initialisation code common to all constructors 78 122 # … … 83 127 $self->{_gpc1Db} = $self->{_config}->getGpc1Instance(); 84 128 $self->{_czarDb} = $self->{_config}->getCzarDbInstance(); 129 $self->setStandardMode(); 85 130 } 86 131 … … 140 185 my $stages = undef; 141 186 if (!$selectedStage) { 142 $stages = \@ allStages;187 $stages = \@{$self->{allStages}}; 143 188 $selectedStage = 'all_stages'; 144 189 } … … 203 248 "set style histogram rowstacked;" . 204 249 "set style fill solid border -1;" . 205 "set ylabel \" Exposures processed per $interval\";" .250 "set ylabel \"Items processed per $interval\";" . 206 251 "set boxwidth 0.75;" . 207 252 "plot "; 208 253 209 254 my $first = 1; 210 foreach my $stage (@ allStages) {255 foreach my $stage (@{$self->{allStages}}) { 211 256 212 257 … … 226 271 ########################################################################### 227 272 # 228 # Plots a time series for all stagesfor this label273 # Plots a time series for all or one stage for this label 229 274 # 230 275 ########################################################################### … … 238 283 my $stages = undef; 239 284 240 if (!$selectedStage) {$stages = \@ allStages;}285 if (!$selectedStage) {$stages = \@{$self->{allStages}};} 241 286 else {$stages = ["$selectedStage"]}; 242 287 … … 297 342 $timeDiff, 298 343 "", 299 " Exposures");344 "Items"); 300 345 } 301 346 … … 314 359 $timeDiff, 315 360 "", 316 "Log( Exposures)");361 "Log(Items)"); 317 362 } 318 363 … … 331 376 $timeDiff, 332 377 "", 333 " Exposures per hour");378 "Items per hour"); 334 379 } 335 380 } … … 351 396 my $stage = undef; 352 397 my $pendingMinusFaults = undef; 353 foreach $stage (@ allStages) {398 foreach $stage (@{$self->{allStages}}) { 354 399 355 400 if (!$self->{_czarDb}->countProcessedPendingAndFaults( … … 381 426 "set style histogram rowstacked;" . 382 427 "set style fill solid border -1;" . 383 "set ylabel \" Exposures\";" .428 "set ylabel \"Items\";" . 384 429 "set boxwidth 0.75;" . 385 430 "plot '".$tmpFile->filename."' using 2:xtic(1) title \"Faults\" lt 1, '' using 3 title \"Processed\" lt 2, '' using 4 title \"Pending\" lt 7;" . … … 520 565 my $firstIn = 1; 521 566 # loop through stages array so that they are ordered properly (not maintained in hash) 522 foreach my $stage (@allStages) { 567 #foreach my $stage (@allStages) { 568 foreach my $stage (@{$self->{allStages}}) { 523 569 524 570 if(!$gnuplotFiles->{$stage}) {next;} … … 620 666 "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" . 621 667 "set style fill solid 1.00 border -1;" . 668 "set key center top;" . 622 669 "set style histogram rowstacked;" . 623 670 "set style data histograms;" . -
branches/eam_branches/ipp-20111122/ippMonitor/raw/czartool_labels.php
r32644 r32851 27 27 menu($myMenu, 'Czartool on '.$lastUpdateTime, 'ipp.css', $ID['link'], $ID['proj']); 28 28 29 $states=array("full","new","drop","wait"); 30 $stages=array("burntool", "chip","cam","fake","warp","stack","diff","magic","magicDS","dist", "pub"); 29 $stages=array( 30 "burntool", 31 "chip", 32 "cam", 33 "fake", 34 "warp", 35 "stack", 36 "diff", 37 "magic", 38 "magicDS", 39 "dist", 40 "pub"); 41 31 42 $servers=array( 32 43 "addstar", … … 150 161 echo "<br>"; 151 162 echo $table; 152 #"<table width=\"$width\" align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 163 153 164 createTableTitle("Status and links", 3); 154 165 echo "<tr>\n"; … … 180 191 $pubLabels, 181 192 $stages, 182 $states,183 193 "new", 184 194 $selectedLabel, … … 349 359 $pubLabels, 350 360 $stages, 351 $states,352 361 $selectedState, 353 362 $selectedLabel, $selectedStage, $plotType) { -
branches/eam_branches/ipp-20111122/ippMonitor/raw/ipp.imfiles.dat
r29481 r32851 21 21 menutop | menutop | link | simple plot - chip (to remove?) | simplePlot.php 22 22 menutop | menutop | link | simple plot - cam (to remove?) | simplePlotcam.php 23 menutop | menutop | link | czartool | czartool_labels.php 23 menutop | menutop | link | czartool - standard | czartool_labels.php 24 menutop | menutop | link | czartool - ipptopsps | czartool_ipptopsps.php 24 25 menutop | menutop | link | mask stats | maskStats.php 25 26
Note:
See TracChangeset
for help on using the changeset viewer.
