[rrd-users] Best way to handle long delays between updates?
Coates, Jack
Jack.Coates at landesk.com
Sun Nov 2 19:41:10 CET 2008
Hi,
I'm wanting to use Simple::RRD to build stats graphics from a program
that is intended to run infrequently (say once or twice a day). I've got
this working reasonably well, except that it's showing single dots on
the update times, and I'd like it to extrapolate lines between the dots.
What's the recommended best practice for this sort of usage? Should I be
adjusting frequency?
Here's what I'm using now:
use RRD::Simple;
...
# Prepare the RRD files
my ( $ldmsrrd, $ldmsrrdfile );
$ldmsrrdfile = "ldmsstats.rrd";
if (! -e $ldmsrrdfile ) {
# LDMS RRD file didn't exist, so create and initialize it
$ldmsrrd = RRD::Simple->new( file => "$ldmsrrdfile" );
$ldmsrrd->create( $ldmsrrdfile, "mrtg",
AllDevices => "GAUGE",
DayDevices => "GAUGE",
WeekDevices => "GAUGE",
);
} else {
# LDMS RRD file did exist, so we just need to initialize it
$ldmsrrd = RRD::Simple->new( file => $ldmsrrdfile );
}
...
# Update RRD too
$ldmsrrd->update(
AllDevices => $allmachines,
DayDevices => $dbscans,
WeekDevices => $dbscansweek
);
my %rtn = $ldmsrrd->graph(
destination => "$reportdir",
title => "LDMS Inventory Statistics",
vertical_label => "Devices / Daily / Weekly",
interlaced => ""
);
if ($DEBUG) {
&LogDebug("Logged LDMS RRD statistics: "
. map { $rtn{$_}->[0] } keys %rtn
);
}
Thanks,
Jack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20081102/2ddc48fc/attachment-0001.html
More information about the rrd-users
mailing list