[rrd-users] Re: Newbie: "step" confusion, blank plots

Mike Hunter mhunter at ack.Berkeley.EDU
Thu Oct 2 20:26:04 MEST 2003


On Sep 25, "To rrd-users at list.ee.ethz.ch" wrote:

Since I didn't get any hits on my initial email, let me try rephrasing my
problem into something simpler.

Can somebody show me how to make an rrdgraph out of the following
datafile?

2003-08-29.013001       10920070747     8291601450
2003-08-29.014501       9914236068      9615483756
2003-08-29.020001       8202305396      7795379166
2003-08-29.021501       7450926286      7995740622
2003-08-29.023001       7100548682      7943914961
2003-08-29.024501       7928561712      8222909469
2003-08-29.030001       5779334162      7954788420
2003-08-29.031501       5404870464      8294500672
2003-08-29.033001       4751317213      6861155522
2003-08-29.034501       5624335005      8089450973
2003-08-29.040001       2908052123      5655948510
2003-08-29.041501       5171003056      8099823516
2003-08-29.043001       4059829955      7416167984
2003-08-29.044501       4467995422      8396832232
2003-08-29.050001       3498427949      7258680374
2003-08-29.051501       4523794735      8226483341
2003-08-29.053001       3161418542      7720306661
2003-08-29.054501       3093824420      7140138469
...

I hate morons who don't read the man page too, but I've tried and I can't
figure this out :|

The code to convert the dates to epoch seconds is as follows:

...
  my ($datemess, $in, $out) = split /\s+/, $_;
  my ($year, $month, $day, $timemess) = split /[-.]/, $datemess;
  my $hour = substr $timemess, 0, 2;
  my $minute = substr $timemess, 2, 2;
  my $second = substr $timemess, 4, 2;
  $hour =~ s/^0*(.)/$1/;
  $minute =~ s/^0*(.)/$1/;
  $second =~ s/^0*(.)/$1/;
  my $epoch_cmd = "date -j -v".$year."y -v".$month."m -v".$day."d -v".
                  $hour."H -v".$minute."M -v".$second."S \"+%s\"";
  $debug and print $epoch_cmd;
  my $epoch = `$epoch_cmd`;
...

Thanks,

Mike

--
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