Changeset 34249 for trunk/ippMonitor/czartool/czartool/Plotter.pm
- Timestamp:
- Jul 31, 2012, 2:20:53 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/czartool/czartool/Plotter.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/czartool/czartool/Plotter.pm
r34109 r34249 666 666 "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" . 667 667 "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 ########################################################################### 690 sub 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; " . 668 713 "set key center top;" . 669 714 "set style histogram rowstacked;" .
Note:
See TracChangeset
for help on using the changeset viewer.
