[rrd-users] Blank graph.

assakhof assakhof at mimos.my
Fri Sep 15 17:13:37 MEST 2000


Hi,

I wrote a Perl script to get utilization of my Remote Access (RAS). I 
pulled data every 10 minutes. But the graph just produced a grid, axis and 
legend. Any idea ?

Below is a partial of my code;
-----------8<------
sub create_rrd
{
   my ($rrd, $start) = @_;
   # $start=time;
   chdir ($data_dir);
   print "CREATE $data_dir /$rrd\n";
   RRDs::create ($rrd, "--start",$start-1,"--step",600,
         "DS:reg_dat:GAUGE:900:U:U",
         "RRA:AVERAGE:0.5:1:600",
         "RRA:AVERAGE:0.5:6:700",
         "RRA:AVERAGE:0.5:24:775",
         "RRA:AVERAGE:0.5:288:797"
   );

   my $ERROR = RRDs::error;
   print "$0: unable to create `$rrd': $ERROR\n" if $ERROR;

}
sub update_rrd
{
   my ($t, $rrd, $region_data) = @_;
   my $gif_file = $rrd;

   $gif_file =~ s/\.rrd.*//g;

   &create_html($gif_file);

   RRDs::update $rrd, "$t:$region_data";
   my $ERROR = RRDs::error;
   print "$0: unable to update `$rrd': $ERROR\n" if $ERROR;

   RRDs::graph "$data_gif/$gif_file-day.gif",
   "--title", uc($gif_file) . " day",
   "--start", "-1h",
   "--vertical-label", "port",
   "--lower-limit=0",
   "DEF:reg_dat=$rrd:reg_dat:AVERAGE",
   "AREA:reg_dat#00b6e4:user",
   "HRULE:$total_modem#FF0000:all modem"
   ;
}

-----------8<------
Sample data:

971434800 north.rrd 542
971435400 north.rrd 630
971436000 north.rrd 241
971436600 north.rrd 640


Thanks in advance,

--assakhof


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list