IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40702


Ignore:
Timestamp:
Apr 18, 2019, 10:46:21 AM (7 years ago)
Author:
tdeboer
Message:

Updates to Czarpoll/Plotter/CzarDb to change IPPmonitor plots

Location:
trunk/ippMonitor/czartool
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/czartool/czarpoll.pl

    r40092 r40702  
    350350    $plotter->setStandardMode();
    351351
    352     foreach $stage (@stages) {
    353         foreach $row ( @{$rows} ) {
    354             my ($label) = @{$row};
    355 
    356             # skip update labels for now. The plots are not relevant.
    357             next if $label =~ 'ps_ud';
    358 
    359             chomp($label);
    360             $plotter->createTimeSeries($label, $stage, $begin, $end, 1, 0, 1);
    361         }
    362     }
     352    #TdB 20190411: We are turning off these plots for the time being. They take up a lot of time and are rarely looked at. If need be, can be generated on the fly using czartool.
     353    #foreach $stage (@stages) {
     354    #    foreach $row ( @{$rows} ) {
     355    #        my ($label) = @{$row};
     356
     357    #        # skip update labels for now. The plots are not relevant.
     358    #        next if $label =~ 'ps_ud';
     359
     360    #        chomp($label);
     361    #        $plotter->createTimeSeries($label, $stage, $begin, $end, 1, 0, 1);
     362    #    }
     363    #}
    363364
    364365    my $allServerLabels = undef;
    365366
    366367    # create plots for each label for all stages
    367     foreach $row ( @{$rows} ) {
    368         my ($label) = @{$row};
    369 
    370         # skip update labels for now. The plots are not relevant.
    371         next if $label =~ 'ps_ud';
    372         # Skip individual label tables for raw-like stages.
    373 #       if ($stage =~ /Exp/) { next; }
    374 
    375         $plotter->createTimeSeries($label, undef, $begin, $end, 1, 1, 1);
    376     }
     368    #TdB 20190411: We are turning off some these plots for the time being.
     369    #foreach $row ( @{$rows} ) {
     370    #    my ($label) = @{$row};
     371
     372    #  #  # skip update labels for now. The plots are not relevant.
     373    #  #  next if $label =~ 'ps_ud';
     374    #  #  # Skip individual label tables for raw-like stages.
     375    #  # if ($stage =~ /Exp/) { next; }
     376    #  #  $plotter->createTimeSeries($label, undef, $begin, $end, 1, 1, 1);
     377
     378    #    #TdB 20190411: Make the all stages plots for the nightlyscience labels only
     379    #    if ($label =~ m/nightlyscience/) {
     380    #      $plotter->createTimeSeries($label, undef, $begin, $end, 1, 0, 1);
     381    #    }
     382    #}
    377383
    378384    $allServerLabels = "all_".$server."_labels";
     
    380386    $plotter->createTimeSeries($allServerLabels, undef, $begin, $end, 1, 0, 1);
    381387
    382     foreach $stage (@stages) {
    383 
    384         $plotter->createTimeSeries($allServerLabels, $stage, $begin, $end, 1, 0, 1); # TODO must be a neater way...
    385     }
     388    #TdB 20190411: We are turning off these plots for the time being. They take up a lot of time and are rarely looked at. If need be, can be generated on the fly using czartool.
     389    #foreach $stage (@stages) {
     390    #    $plotter->createTimeSeries($allServerLabels, $stage, $begin, $end, 1, 0, 1); # TODO must be a neater way...
     391    #}
    386392}
    387393
  • trunk/ippMonitor/czartool/czartool/CzarDb.pm

    r40429 r40702  
    282282        ## labels, but this suffices for now
    283283        push @{$labels}, 'PV3.Pole.Reprocess.20180510';
     284        push @{$labels}, 'ps_ud_QUB';
    284285    }
    285286
     
    944945        host, used, available, writable, readable
    945946        FROM hosts
    946         ORDER BY host;
     947        ORDER BY host DESC;
    947948SQL
    948949
  • trunk/ippMonitor/czartool/czartool/Plotter.pm

    r40630 r40702  
    7878                                                    };
    7979    $self->{_dateFormat} = "%Y%m%d-%H%M%S";
    80     $self->{_outputFormat} = "png font \"".$self->{_config}->getGnuplotFont()."\" ".$self->{_config}->getGnuplotFontSize();
     80    #$self->{_outputFormat} = "png font \"".$self->{_config}->getGnuplotFont()."\" ".$self->{_config}->getGnuplotFontSize();
     81    $self->{_outputFormat} = "pngcairo dashed font \"".$self->{_config}->getGnuplotFont().", ".$self->{_config}->getGnuplotFontSize()."\" ";
     82
    8183
    8284    bless $self, $class;
     
    463465        "set ylabel \"Items\";" .
    464466        "set boxwidth 0.75;" .
    465         "plot '".$tmpFile->filename."' using 2:xtic(1) title \"Faults\" lt 1, '' using 3 title \"Processed\" lt 2, '' using 4 title \"Pending\" lt 7;" .
     467        "plot '".$tmpFile->filename."' using 2:xtic(1) title \"Faults\" lt 1, '' using 3 title \"Processed\" lt 1 lc 2, '' using 4 title \"Pending\" lt 1 lc 4;" .
    466468        "\n";
    467469
     
    595597        "set xlabel \"Time\";" .
    596598        "set ylabel \"$yTitle\";" .
     599        "set style line  1 lt 1 lw 2 lc rgb '#a6cee3';" .
     600        "set style line  2 lt 1 lw 2 lc rgb '#1f78b4';" .
     601        "set style line  3 lt 2 lw 2 lc rgb '#fb9a99';" .
     602        "set style line  4 lt 1 lw 2 lc rgb '#e31a1c';" .
     603        "set style line  5 lt 1 lw 2 lc rgb '#33a02c';" .
     604        "set style line  6 lt 2 lw 2 lc rgb '#b2df8a';" .
     605        "set style line  7 lt 1 lw 2 lc rgb '#ff7f00';" .
     606        "set style line  8 lt 2 lw 2 lc rgb '#fdbf6f';" .
     607        "set style line  9 lt 1 lw 2 lc rgb '#cab2d6';" .
     608        "set style line 10 lt 1 lw 2 lc rgb '#6a3d9a';" .
     609        "set style line 11 lt 3 lw 2 lc rgb 'cyan';" .
     610        "set style line 12 lt 3 lw 2 lc rgb '#c51b7d';" .
     611        "set style line 13 lt 3 lw 2 lc rgb '#b15928';" .
     612        "set style line 14 lt 3 lw 2 lc rgb '#000004';" .
    597613        "plot ";
    598614
     
    600616    # loop through stages array so that they are ordered properly (not maintained in hash)
    601617    #foreach my $stage (@allStages) {
     618
     619    my $plotnr = 1;
    602620    foreach my $stage (@{$self->{allStages}}) {
    603621
     
    608626        if ($numOfPlots == 1) {
    609627
    610             print GP "'" . $gnuplotFiles->{$stage} . "' using 1:2 title \"Pending\" with lines lt 4 lw 2,";
    611             print GP "'" . $gnuplotFiles->{$stage} . "' using 1:4 title \"Processed\" with lines lt 2 lw 2,";
    612             print GP "'" . $gnuplotFiles->{$stage} . "' using 1:3 title \"Faults\" with lines lt 1 lw 2";
     628            print GP "'" . $gnuplotFiles->{$stage} . "' using 1:2 title \"Pending\" with lines lt 1 lc 4 lw 2,";
     629            print GP "'" . $gnuplotFiles->{$stage} . "' using 1:4 title \"Processed\" with lines lt 1 lc 2 lw 2,";
     630            print GP "'" . $gnuplotFiles->{$stage} . "' using 1:3 title \"Faults\" with lines lt 1 lc 1 lw 2";
    613631        }
    614632        # when plotting multiple stages, show only processed
    615633        else {
    616 
    617             print GP "'" . $gnuplotFiles->{$stage} . "' using 1:4 title \"$stage\" with lines lw 2";
     634            #TdB 20190411: adding specific linetypes to the plotting command
     635            #print GP "'" . $gnuplotFiles->{$stage} . "' using 1:4 title \"$stage\" with lines lw 2";
     636            print GP "'" . $gnuplotFiles->{$stage} . "' using 1:4 title \"$stage\" with lines ls \"$plotnr\"";
     637            $plotnr = $plotnr+1;
    618638        }
    619639        $firstIn = 0;
     
    668688        set xlabel "Time"
    669689        set ylabel "Available (TB)"
    670         plot "$datFile" using 1:2 title "Available" with lines lt 2 lw 2, "$datFile" using 1:3 title "Theoretical" with lines lt 3 lw 2
     690        plot "$datFile" using 1:2 title "Available" with lines lt 1 lc 2 lw 2, "$datFile" using 1:3 title "Theoretical" with lines lt 1 lc 3 lw 2
    671691PLOT
    672692
     
    699719    GP->autoflush(1);
    700720
     721    #TdB 20190411: There have been requests for rotating this plot to increase readability of the machine names
    701722    if ($self->{_outputFormat} ne "X11") {print GP "set output \"$outputFile\";";}
    702723    print GP
    703         "set term $self->{_outputFormat};" .
     724        "set term $self->{_outputFormat} size 640,1154;" .
    704725        "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" .
    705726        "set style fill solid 1.00 border -1;" .
    706         "set key center top;" .
    707         "set style histogram rowstacked;" .
    708         "set style data histograms;" .
    709         "set ylabel \"Space (TB)\";" .
    710         "set xtic rotate by -90 scale 0;" .
    711         "set yrange [:180];" .
     727        "set bmarg 5; " .
     728        "set key center right;" .
     729        "set xlabel \"Space (TB)\";" .
     730        "set xrange [:180];" .
     731        "set ytics font '/usr/share/fonts/corefonts/arial.ttf,8';" .
     732        "set multiplot;" .
     733        "set origin 0.06,-0.02;" .
     734        "set size 0.95,1.02;" .
     735        "set ytics offset -7,0;" .
    712736        "plot '".$tmpFile->filename."' " .
    713         "using 2:xtic(1) t \"Used\" lt 7," .
    714         "'' using 3 t \"Over $limit% used\" lt 1," .
    715         "'' using 4 t \"Unavailable\" fs solid 0.50 lt -1 ," .
    716         "'' using 5 t \"Free\" lt 2," .
    717         "'' using 6 notitle fs solid 0.50 lt -1" .
     737        "using (column(2)):(column(0)):(0):(column(2)):(column(0)-0.5):(column(0)+0.5):ytic(int(column(0))%2==1?stringcolumn(1):'') notitle lt 6 with boxxyerrorbars;" .
     738        "set ytics offset -1,0;" .
     739        "plot '".$tmpFile->filename."' " .
     740        "using (column(2)):(column(0)):(0):(column(2)):(column(0)-0.5):(column(0)+0.5):ytic(int(column(0))%2==1?'--------':'') notitle lt 6 with boxxyerrorbars;" .
     741        "set ytics offset 0.5,0;" .
     742        "plot '".$tmpFile->filename."' " .
     743        "using (column(2)):(column(0)):(0):(column(2)):(column(0)-0.5):(column(0)+0.5):ytic(int(column(0))%2==0?stringcolumn(1):'')  t \"Used\" lt 6 with boxxyerrorbars," .
     744        "'' using (column(3)):(column(0)):(column(2)):(column(2)+column(3)):(column(0)-0.5):(column(0)+0.5) t \"Over column(limit% used\" lt 1 with boxxyerrorbars," .
     745        "'' using (column(4)):(column(0)):(column(2)+column(3)):(column(2)+column(3)+column(4)):(column(0)-0.5):(column(0)+0.5) t \"Unavailable\" lt 1 lc rgb 'gray' with boxxyerrorbars," .
     746        "'' using (column(5)):(column(0)):(column(2)+column(3)+column(4)):(column(2)+column(3)+column(4)+column(5)):(column(0)-0.5):(column(0)+0.5) t \"Free\" lt 1 lc 2 with boxxyerrorbars," .
     747        "'' using (column(6)):(column(0)):(column(2)+column(3)+column(4)+column(5)):(column(2)+column(3)+column(4)+column(5)+column(6)):(column(0)-0.5):(column(0)+0.5) notitle lt 1 lc rgb 'gray' with boxxyerrorbars" .
    718748        ";" .
    719 
     749        "unset multiplot;" .
    720750        "\n";
    721751    close GP;
     752
     753    #print GP
     754    #    "set term $self->{_outputFormat} size 2560,1024;" .
     755    #    "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" .
     756    #    "set style fill solid 1.00 border -1;" .
     757    #    "set bmarg 5; " .
     758    #    "set key center top;" .
     759    #    "set style histogram rowstacked;" .
     760    #    "set style data histograms;" .
     761    #    "set ylabel \"Space (TB)\";" .
     762    #    "set yrange [:180];" .
     763    #    "set xtic rotate by -90 scale 0;" .
     764    #    "plot '".$tmpFile->filename."' " .
     765    #    "using 2:xtic(1) t \"Used\" lt 7," .
     766    #    "'' using 3 t \"Over $limit% used\" lt 1," .
     767    #    "'' using 4 t \"Unavailable\" fs solid 0.50 lt -1 ," .
     768    #    "'' using 5 t \"Free\" lt 2," .
     769    #    "'' using 6 notitle fs solid 0.50 lt -1" .
     770    #    ";" .
     771
     772    #    "\n";
     773    #close GP;
    722774}
    723775
     
    746798    if ($self->{_outputFormat} ne "X11") {print GP "set output \"$outputFile\";";}
    747799    print GP
    748         "set term $self->{_outputFormat} size 2560,1024;" .
     800        "set term $self->{_outputFormat} size 640,1154;" .
    749801        "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" .
    750802        "set style fill solid 1.00 border -1;" .
    751803        "set bmarg 5; " .
    752         "set key center top;" .
    753         "set style histogram rowstacked;" .
    754         "set style data histograms;" .
    755         "set ylabel \"Space (TB)\";" .
    756         "set yrange [:180];" .
    757         "set xtic rotate by -90 scale 0;" .
     804        "set key center right;" .
     805        "set xlabel \"Space (TB)\";" .
     806        "set xrange [:180];" .
     807        "set ytics font '/usr/share/fonts/corefonts/arial.ttf,8';" .
     808        "set multiplot;" .
     809        "set origin 0.06,-0.02;" .
     810        "set size 0.95,1.02;" .
     811        "set ytics offset -7,0;" .
    758812        "plot '".$tmpFile->filename."' " .
    759         "using 2:xtic(1) t \"Used\" lt 7," .
    760         "'' using 3 t \"Over $limit% used\" lt 1," .
    761         "'' using 4 t \"Unavailable\" fs solid 0.50 lt -1 ," .
    762         "'' using 5 t \"Free\" lt 2," .
    763         "'' using 6 notitle fs solid 0.50 lt -1" .
     813        "using (column(2)):(column(0)):(0):(column(2)):(column(0)-0.5):(column(0)+0.5):ytic(int(column(0))%2==1?stringcolumn(1):'') notitle lt 6 with boxxyerrorbars;" .
     814        "set ytics offset -1,0;" .
     815        "plot '".$tmpFile->filename."' " .
     816        "using (column(2)):(column(0)):(0):(column(2)):(column(0)-0.5):(column(0)+0.5):ytic(int(column(0))%2==1?'--------':'') notitle lt 6 with boxxyerrorbars;" .
     817        "set ytics offset 0.5,0;" .
     818        "plot '".$tmpFile->filename."' " .
     819        "using (column(2)):(column(0)):(0):(column(2)):(column(0)-0.5):(column(0)+0.5):ytic(int(column(0))%2==0?stringcolumn(1):'')  t \"Used\" lt 6 with boxxyerrorbars," .
     820        "'' using (column(3)):(column(0)):(column(2)):(column(2)+column(3)):(column(0)-0.5):(column(0)+0.5) t \"Over column(limit% used\" lt 1 with boxxyerrorbars," .
     821        "'' using (column(4)):(column(0)):(column(2)+column(3)):(column(2)+column(3)+column(4)):(column(0)-0.5):(column(0)+0.5) t \"Unavailable\" lt 1 lc rgb 'gray' with boxxyerrorbars," .
     822        "'' using (column(5)):(column(0)):(column(2)+column(3)+column(4)):(column(2)+column(3)+column(4)+column(5)):(column(0)-0.5):(column(0)+0.5) t \"Free\" lt 1 lc 2 with boxxyerrorbars," .
     823        "'' using (column(6)):(column(0)):(column(2)+column(3)+column(4)+column(5)):(column(2)+column(3)+column(4)+column(5)+column(6)):(column(0)-0.5):(column(0)+0.5) notitle lt 1 lc rgb 'gray' with boxxyerrorbars" .
    764824        ";" .
    765 
     825        "unset multiplot;" .
    766826        "\n";
    767827    close GP;
     828
     829    #print GP
     830    #    "set term $self->{_outputFormat} size 2560,1024;" .
     831    #    "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" .
     832    #    "set style fill solid 1.00 border -1;" .
     833    #    "set bmarg 5; " .
     834    #    "set key center top;" .
     835    #    "set style histogram rowstacked;" .
     836    #    "set style data histograms;" .
     837    #    "set ylabel \"Space (TB)\";" .
     838    #    "set yrange [:180];" .
     839    #    "set xtic rotate by -90 scale 0;" .
     840    #    "plot '".$tmpFile->filename."' " .
     841    #    "using 2:xtic(1) t \"Used\" lt 7," .
     842    #    "'' using 3 t \"Over $limit% used\" lt 1," .
     843    #    "'' using 4 t \"Unavailable\" fs solid 0.50 lt -1 ," .
     844    #    "'' using 5 t \"Free\" lt 2," .
     845    #    "'' using 6 notitle fs solid 0.50 lt -1" .
     846    #    ";" .
     847    #    "\n";
     848    #close GP;
    768849}
    769850
Note: See TracChangeset for help on using the changeset viewer.