IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 6, 2010, 4:44:37 PM (16 years ago)
Author:
rhenders
Message:

Nebulous cluster space plot added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/czartool/Czarplot.pm

    r28846 r28862  
    347347    my ($self) = @_;
    348348
    349     my $outputFile = "/tmp/czarplot_hosts.png";
    350 
    351     my $inputFile = $self->{_czarDb}->createHostsData();
     349    my $outputFile = "/tmp/czarplot_hosts_space.png";
     350    my $limit = 97.0;
     351    my $inputFile = $self->{_czarDb}->createHostsData($limit);
     352
     353    my $totalUsed = $self->{_czarDb}->getTotalClusterStorageAsPercentage();
     354
     355my $totalPercent = sprintf("%.1f%%", $totalUsed);
    352356
    353357    open (GP, "|/usr/bin/gnuplot -persist") or die "no gnuplot";
     
    358362        "set term $self->{_outputFormat};" .
    359363        "set output \"$outputFile\";" .
    360         "set title \"Nebulous disk use across IPP cluster\";" .
     364        "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" .
    361365        "set style fill solid 1.00 border -1;" .
    362366        "set style histogram rowstacked;" .
     
    364368        "set ylabel \"Space (TB)\";" .
    365369        "set xtic rotate by -90 scale 0;" .
    366         "plot '$inputFile' using 2:xtic(1) t \"Used\" , '' using 3 t \"Available\";" .
     370        "plot '$inputFile' " .
     371        "using 2:xtic(1) t \"Used\" lt 7," .
     372        "'' using 3 t \"Over $limit% used\" lt 1," .
     373        "'' using 4 t \"Unavailable\" fs solid 0.50 lt -1 ," .
     374        "'' using 5 t \"Free\" lt 2," .
     375        "'' using 6 notitle fs solid 0.50 lt -1" .
     376        ";" .
    367377
    368378        "\n";
Note: See TracChangeset for help on using the changeset viewer.