Lines 1-5
Link Here
|
1 |
--- makegraph.pl.orig Sat Jan 3 16:44:21 2004 |
1 |
--- makegraph.pl.orig Thu Jun 1 18:39:09 2006 |
2 |
+++ makegraph.pl Tue Feb 7 12:48:07 2006 |
2 |
+++ makegraph.pl Thu Jun 1 18:55:09 2006 |
3 |
@@ -19,8 +19,6 @@ |
3 |
@@ -19,8 +19,6 @@ |
4 |
#Sugestoes e criticas (sem flames!!) mailto:sartori@ifgraph.lrv.ufsc.br |
4 |
#Sugestoes e criticas (sem flames!!) mailto:sartori@ifgraph.lrv.ufsc.br |
5 |
#Visite: http://ifgraph.lrv.ufsc.br |
5 |
#Visite: http://ifgraph.lrv.ufsc.br |
Lines 25-27
Link Here
|
25 |
|
25 |
|
26 |
# HELP |
26 |
# HELP |
27 |
if (defined($opt_h)) { |
27 |
if (defined($opt_h)) { |
|
|
28 |
@@ -48,7 +39,7 @@ |
29 |
|
30 |
# Creating a color converter object |
31 |
&debug("main(): Creating a RGB converter object from Color::Rgb\n"); |
32 |
-$rgb_converter = new Color::Rgb(rgb_txt=>"$FindBin::Bin/lib/rgb.txt"); |
33 |
+$rgb_converter = new Color::Rgb(rgb_txt=>"/usr/local/ifgraph/lib/rgb.txt"); |
34 |
if ($rgb_converter) { &debug("main(): Ok RGB converter object created\n"); } |
35 |
|
36 |
# Defining the $configile variable |
37 |
@@ -737,7 +728,7 @@ |
38 |
&debug("criaGraficoBits(): Colors are $color_back, $color_canvas, $color_shadea, $color_shadeb, $color_grid, $color_mgrid, $color_font, $color_frame, $color_arrow, $color_in, $color_out\ncriaGraficoBits(): Options are $$targets[$targetindex][6]->[0] $$targets[$targetindex][6]->[1] $$targets[$targetindex][6]->[2] $$targets[$targetindex][6]->[3] $$targets[$targetindex][6]->[4] $$targets[$targetindex][6]->[5]\ncriaGraficoBits(): Dimensions are $$targets[$targetindex][7]->[0] x $$targets[$targetindex][7]->[1]\n"); |
39 |
my($start); |
40 |
while ($start=shift(@period)) { |
41 |
- print(RRDTOOL "graph $global->[3]/$targets->[$targetindex][0]$start.$opt_imgformat -a $$global[5] -b 1000 $opt_rigid -s $start -e -$targets->[$targetindex][19] $opt_legend $opt_nominor -w $dim_width -h $dim_height -c BACK$color_back -c CANVAS$color_canvas -c SHADEA$color_shadea -c SHADEB$color_shadeb -c GRID$color_grid -c MGRID$color_mgrid -c FONT$color_font -c FRAME$color_frame -c ARROW$color_arrow -v \"$$targets[$targetindex][9]\" -t \"$$targets[$targetindex][10]\" $opt_inout_def CDEF:deltain=totalin,errin,-,0,LT,0,totalin,errin,-,IF CDEF:in=deltain,0,LT,0,deltain,IF,$bytes_bwidth_in,GT,$bytes_bwidth_in,deltain,IF CDEF:deltaout=totalout,errout,-,0,LT,0,totalout,errout,-,IF CDEF:out=deltaout,0,LT,0,deltaout,IF,$bytes_bwidth_out,GT,$bytes_bwidth_out,deltaout,IF CDEF:bitsin=in,8,* CDEF:bitsout=out,8,* CDEF:kbitsin=bitsin,1000,\/ CDEF:kbitsout=bitsout,1000,\/ CDEF:percbin=bitsin,100,*,$bwidth_in,\/ CDEF:percbout=bitsout,100,*,$bwidth_out,\/ CDEF:berrin=errin,8,\/ CDEF:ber |
28 |
rout=errout,8,\/ AREA:bitsin$color_in:\"$$targets[$targetindex][11]->[0]\" LINE2:bitsout$color_out:\"$$targets[$targetindex][11]->[1]\\l\" GPRINT:kbitsin:LAST:\'$$targets[$targetindex][11]->[0] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:LAST:\' (%.1lf%%)\' GPRINT:kbitsin:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:AVERAGE:\' (%.1lf%%)\' GPRINT:kbitsin:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:MAX:\' (%.1lf%%)\\l\' GPRINT:kbitsout:LAST:\'$$targets[$targetindex][11]->[1] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:LAST:\' (%.1lf%%)\' GPRINT:kbitsout:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:AVERAGE:\' (%.1lf%%)\' GPRINT:kbitsout:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:MA |
42 |
rout=errout,8,\/ AREA:bitsin$color_in:\"$$targets[$targetindex][11]->[0]\" LINE2:bitsout$color_out:\"$$targets[$targetindex][11]->[1]\\l\" GPRINT:kbitsin:LAST:\'$$targets[$targetindex][11]->[0] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:LAST:\' (%.1lf%%)\' GPRINT:kbitsin:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:AVERAGE:\' (%.1lf%%)\' GPRINT:kbitsin:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:MAX:\' (%.1lf%%)\\l\' GPRINT:kbitsout:LAST:\'$$targets[$targetindex][11]->[1] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:LAST:\' (%.1lf%%)\' GPRINT:kbitsout:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:AVERAGE:\' (%.1lf%%)\' GPRINT:kbitsout:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:MA |
29 |
X:\' (%.1lf%%)\\l\' COMMENT:\'Max bits for target $targets->[$targetindex][0]\: $bwidth_in - $bwidth_out bits/sec \\l\' $opt_error\n") || die("criaGraficoBits() Fatal: Could not print to filehandle RRDTOOL: $!\n"); |
43 |
X:\' (%.1lf%%)\\l\' COMMENT:\'Max bits for target $targets->[$targetindex][0]\: $bwidth_in - $bwidth_out bits/sec \\l\' $opt_error\n") || die("criaGraficoBits() Fatal: Could not print to filehandle RRDTOOL: $!\n"); |
|
|
44 |
+ print(RRDTOOL "graph $global->[3]/$targets->[$targetindex][0]$start.$opt_imgformat -a $$global[5] -b 1000 $opt_rigid -s $start -e -$targets->[$targetindex][19] $opt_legend $opt_nominor -w $dim_width -h $dim_height -c BACK$color_back -c CANVAS$color_canvas -c SHADEA$color_shadea -c SHADEB$color_shadeb -c GRID$color_grid -c MGRID$color_mgrid -c FONT$color_font -c FRAME$color_frame -c ARROW$color_arrow -v \"$$targets[$targetindex][9]\" -t \"$$targets[$targetindex][10]\" $opt_inout_def CDEF:deltain=totalin,errin,-,0,LT,0,totalin,errin,-,IF CDEF:in=deltain,0,LT,0,deltain,IF,$bytes_bwidth_in,GT,$bytes_bwidth_in,deltain,IF CDEF:deltaout=totalout,errout,-,0,LT,0,totalout,errout,-,IF CDEF:out=deltaout,0,LT,0,deltaout,IF,$bytes_bwidth_out,GT,$bytes_bwidth_out,deltaout,IF CDEF:bitsin=in,8,* CDEF:bitsout=out,8,* CDEF:kbitsin=bitsin,1000,\/ CDEF:kbitsout=bitsout,1000,\/ CDEF:percbin=bitsin,100,*,$bwidth_in,\/ CDEF:percbout=bitsout,100,*,$bwidth_out,\/ CDEF:berrin=errin,8,\/ CDEF:ber |
30 |
rout=errout,8,\/ AREA:bitsin$color_in:\"$$targets[$targetindex][11]->[0]\" LINE2:bitsout$color_out:\"$$targets[$targetindex][11]->[1]\\l\" GPRINT:kbitsin:LAST:\'$$targets[$targetindex][11]->[0] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:LAST:\' (%.1lf%%)\' GPRINT:kbitsin:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:AVERAGE:\' (%.1lf%%)\' GPRINT:kbitsin:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:MAX:\' (%.1lf%%)\\l\' GPRINT:kbitsout:LAST:\'$$targets[$targetindex][11]->[1] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:LAST:\' (%.1lf%%)\' GPRINT:kbitsout:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:AVERAGE:\' (%.1lf%%)\' GPRINT:kbitsout:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:MA |
45 |
rout=errout,8,\/ AREA:bitsin$color_in:\"$$targets[$targetindex][11]->[0]\" LINE2:bitsout$color_out:\"$$targets[$targetindex][11]->[1]\\l\" GPRINT:kbitsin:LAST:\'$$targets[$targetindex][11]->[0] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:LAST:\' (%.1lf%%)\' GPRINT:kbitsin:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:AVERAGE:\' (%.1lf%%)\' GPRINT:kbitsin:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbin:MAX:\' (%.1lf%%)\\l\' GPRINT:kbitsout:LAST:\'$$targets[$targetindex][11]->[1] - Now\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:LAST:\' (%.1lf%%)\' GPRINT:kbitsout:AVERAGE:\'Avg\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:AVERAGE:\' (%.1lf%%)\' GPRINT:kbitsout:MAX:\'Max\\: %.$targets->[$targetindex][20]lf $$targets[$targetindex][13]\\g\' GPRINT:percbout:MA |
31 |
X:\' (%.1lf%%)\\l\' COMMENT:\\l $opt_error\n") || die("criaGraficoBits() Fatal: Could not print to filehandle RRDTOOL: $!\n"); |
46 |
X:\' (%.1lf%%)\\l\' COMMENT:\\l $opt_error\n") || die("criaGraficoBits() Fatal: Could not print to filehandle RRDTOOL: $!\n"); |
|
|
47 |
} |
48 |
} |
49 |
|
50 |
@@ -832,7 +823,7 @@ |
51 |
# Setting targets defaults |
52 |
my(@default)=("name","1G","localhost","public",161,0,"","460x150","back#FFFFFF","","","","1000","",1,10,"-1day,-1week,-1month,-1year",0,"",600,2); |
53 |
# Setting global defaults |
54 |
- @global[1,2,3,4,5]=("/usr/local/bin/rrdtool","/usr/local/rrdfiles/","/usr/local/htdocs/","$FindBin::Bin/templates/en/","PNG"); |
55 |
+ @global[1,2,3,4,5]=("/usr/local/bin/rrdtool","/usr/local/rrdfiles/","/usr/local/htdocs/","/usr/local/ifgraph/templates/en/","PNG"); |
56 |
my($accept_new_target)=1; |
57 |
my($index)=-1; # target targetindex |
58 |
open(CONF,"$configfile") || die("readconf() Fatal: Could not read configuration file $configfile ($!)\n"); |