ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/reports/graphing/graph.pl
(Generate patch)

Comparing experimental/reports/graphing/graph.pl (file contents):
Revision 1.1 by tdb, Sat Mar 9 19:53:24 2002 UTC vs.
Revision 1.2 by tdb, Sun Mar 10 03:07:08 2002 UTC

# Line 109 | Line 109 | foreach my $machine (@rrddirlist) {
109              my($baserrd) = $1;
110              my($i) = 0;
111              while( -f "$rrddir/$machine/$baserrd\_$i.rrd" ) {
112 <                push @data, "LINE2:$baserrd\_$i:size" . &get_colour($i) . ":queue$i size ";
112 >                push @data, "LINE2:$baserrd\_$i:size$i" . &get_colour($i) . ":queue$i size ";
113                  ++$i;
114              }
115              push @data, "LINE2:$baserrd\_0:total#FF0000:packets/sec - currently";
116 <            push @rawdata, "GPRINT:total:LAST:\"%lf %spackets/sec\"";
116 >            push @rawdata, "GPRINT:total:LAST:%lf %spackets/sec";
117              my($comment);
118              if(-f "$rrddir/$machine/$baserrd.def") {
119                  open(DEF, "$rrddir/$machine/$baserrd.def");
# Line 140 | Line 140 | foreach my $machine (@rrddirlist) {
140   # $rawcmdref = a reference to an array containing raw rrd commands
141   #              elements a single command each, no spaces
142   #
143 +
144   sub makegraph() {
145      my($machine, $type, $title, $dataref, $rawcmdref) = @_;
146      # pass in these arrays by reference
# Line 165 | Line 166 | sub makegraph() {
166      push @rrdcmd, @rawcmd;
167      RRDs::graph ("$imgdir/$machine/$type-3h.png", "--start=-10800", @rrdcmd);
168      my($err_3h) = RRDs::error;
169 <    print STDERR "Error generating 3h graph for $machine\_$type: $err_3h\n" if $err_3h;
169 >    print STDERR "Error generating 3h graph for $machine/$type: $err_3h\n" if $err_3h;
170      RRDs::graph ("$imgdir/$machine/$type-1d.png", "--start=-86400", @rrdcmd);
171      my($err_1d) = RRDs::error;
172 <    print STDERR "Error generating 1d graph for $machine\_$type: $err_1d\n" if $err_1d;
172 >    print STDERR "Error generating 1d graph for $machine/$type: $err_1d\n" if $err_1d;
173      RRDs::graph ("$imgdir/$machine/$type-1w.png", "--start=-604800", @rrdcmd);
174      my($err_1w) = RRDs::error;
175 <    print STDERR "Error generating 1w graph for $machine\_$type: $err_1w\n" if $err_1w;
175 >    print STDERR "Error generating 1w graph for $machine/$type: $err_1w\n" if $err_1w;
176      RRDs::graph ("$imgdir/$machine/$type-1m.png", "--start=-2678400", @rrdcmd);
177      my($err_1m) = RRDs::error;
178 <    print STDERR "Error generating 1m graph for $machine\_$type: $err_1m\n" if $err_1m;
178 >    print STDERR "Error generating 1m graph for $machine/$type: $err_1m\n" if $err_1m;
179      return;
180   }
181  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines