-#!/usr/bin/perl
+#!/usr/local/bin/perl
=pod
$opts{scaling} = 'Hour';
} # if
-sub labelY ($) {
- my ($value) = @_;
-
- return $opts{tiny} ? '' : $value;
-} # labelY
-
my $clearadm = Clearadm->new;
my $graph = GD::Graph::area->new ($opts{width}, $opts{height});
$opts{scaling}
);
-graphError "No loadavg data found for system $opts{system}"
+graphError "No loadavg data"
unless @loads;
my (@x, @y);
} else {
push @x, $load{timestamp};
} # if
-
+
push @y, $load{loadavg};
} # foreach
my $x_label = $opts{tiny} ? '' : 'Time';
my $y_label = $opts{tiny} ? '' : 'Load';
my $title = $opts{tiny} ? '' : "Load Average for $opts{system}";
+my $labelY = $opts{tiny} ? '' : '%.2f';
$graph->set (
x_label => $x_label,
x_label_skip => $x_label_skip,
x_label_position => .5,
y_label => $y_label,
- y_number_format => &labelY,
+ y_number_format => $labelY,
title => $title,
dclrs => [$opts{color}],
bgclr => 'white',
Copyright (c) 2010, ClearSCM, Inc. All rights reserved.
-=cut
\ No newline at end of file
+=cut