IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 31, 2012, 2:20:53 PM (14 years ago)
Author:
Serge CHASTEL
Message:

Enlarged nebulous view of the storage partitions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/czartool/czartool/Plotter.pm

    r34109 r34249  
    666666        "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" .
    667667        "set style fill solid 1.00 border -1;" .
     668        "set key center top;" .
     669        "set style histogram rowstacked;" .
     670        "set style data histograms;" .
     671        "set ylabel \"Space (TB)\";" .
     672        "set xtic rotate by -90 scale 0;" .
     673        "plot '".$tmpFile->filename."' " .
     674        "using 2:xtic(1) t \"Used\" lt 7," .
     675        "'' using 3 t \"Over $limit% used\" lt 1," .
     676        "'' using 4 t \"Unavailable\" fs solid 0.50 lt -1 ," .
     677        "'' using 5 t \"Free\" lt 2," .
     678        "'' using 6 notitle fs solid 0.50 lt -1" .
     679        ";" .
     680
     681        "\n";
     682    close GP;
     683}
     684
     685###########################################################################
     686#
     687# Plots disk usage across cluster as a stacked histogram
     688#
     689###########################################################################
     690sub plotDiskUsageHistogramLarge {
     691    my ($self) = @_;
     692
     693    my $prefix = $self->{_outputPath} ? $self->{_outputPath} : "."; # TODO should be function for this
     694        my $outputFile = "$prefix/czarplot_hosts_space_large.png";
     695    my $limit = 97.0;
     696    my $tmpFile = File::Temp->new( TEMPLATE => "czarplot_hosts_space.XXXXX", DIR => '/tmp', SUFFIX => 'dat');
     697    $self->{_czarDb}->createHostsData($limit, $tmpFile);
     698
     699    my $totalUsed = $self->{_czarDb}->getTotalClusterStorageAsPercentage();
     700
     701    my $totalPercent = sprintf("%.1f%%", $totalUsed);
     702
     703    open (GP, "|$GNUPLOT -persist") or die "no gnuplot";
     704    use FileHandle;
     705    GP->autoflush(1);
     706
     707    if ($self->{_outputFormat} ne "X11") {print GP "set output \"$outputFile\";";}
     708    print GP
     709        "set term $self->{_outputFormat} size 1280,1024;" .
     710        "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" .
     711        "set style fill solid 1.00 border -1;" .
     712        "set bmarg 5; " .
    668713        "set key center top;" .
    669714        "set style histogram rowstacked;" .
Note: See TracChangeset for help on using the changeset viewer.