projects
/
clearscm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed to not try new images while the monitor is off
[clearscm.git]
/
clearadm
/
plotfs.cgi
diff --git
a/clearadm/plotfs.cgi
b/clearadm/plotfs.cgi
index
e4a5e6c
..
e02bd10
100755
(executable)
--- a/
clearadm/plotfs.cgi
+++ b/
clearadm/plotfs.cgi
@@
-69,7
+69,7
@@
use Clearadm;
use ClearadmWeb;
use Display;
use ClearadmWeb;
use Display;
-use CGI qw
(:standard :cgi-lib);
+use CGI qw(:standard :cgi-lib);
use GD::Graph::area;
my %opts = Vars;
use GD::Graph::area;
my %opts = Vars;
@@
-90,7
+90,7
@@
if ($opts{tiny}) {
my $clearadm = Clearadm->new;
my $clearadm = Clearadm->new;
-my $graph = GD::Graph::area->new
($opts{width}, $opts{height});
+my $graph = GD::Graph::area->new($opts{width}, $opts{height});
graphError "System is required"
unless $opts{system};
graphError "System is required"
unless $opts{system};
@@
-101,7
+101,7
@@
graphError "Filesystem is required"
graphError "Points not numeric (points: $opts{points})"
if $opts{points} and $opts{points} !~ /^\d+$/;
graphError "Points not numeric (points: $opts{points})"
if $opts{points} and $opts{points} !~ /^\d+$/;
-my @fs = $clearadm->GetFS
(
+my @fs = $clearadm->GetFS(
$opts{system},
$opts{filesystem},
$opts{start},
$opts{system},
$opts{filesystem},
$opts{start},
@@
-117,7
+117,7
@@
my (@x, @y);
my $i = 0;
my $i = 0;
-for
each
(@fs) {
+for (@fs) {
$i++;
my %fs = %{$_};
$i++;
my %fs = %{$_};
@@
-129,7
+129,8
@@
foreach (@fs) {
push @y, $opts{meg} ? $fs{used} / (1024 * 1024) :
$fs{used} / (1024 * 1024 * 12024);
push @y, $opts{meg} ? $fs{used} / (1024 * 1024) :
$fs{used} / (1024 * 1024 * 12024);
-}
+} # for
+
my @data = ([@x], [@y]);
my $x_label_skip = @x > 1000 ? 200
my @data = ([@x], [@y]);
my $x_label_skip = @x > 1000 ? 200
@@
-145,7
+146,7
@@
my $title = $opts{tiny} ? '' : "Filesystem usage for "
. "$opts{system}:$opts{filesystem}";
my $labelY = $opts{tiny} ? '' : '%.2f';
. "$opts{system}:$opts{filesystem}";
my $labelY = $opts{tiny} ? '' : '%.2f';
-$graph->set
(
+$graph->set(
x_label =>$x_label,
x_labels_vertical => 1,
x_label_skip => $x_label_skip,
x_label =>$x_label,
x_labels_vertical => 1,
x_label_skip => $x_label_skip,