I want to update a rrd database file, I'm using RRDTool::OO the data is coming out of a database table. each row in the database has in it two columns that are the dsname and the associated value.
to insert a record using RRDTool::OO one does $rrd->update(time => $time, values => [$val1, $val2, ...]); or $rrd->update(time => $time, values => { $dsname1 => $val1, $dsname2 => $val2, ...}); My data is coming out of a SQL database table where the first column is the dsname and the second column is the value. I'm using DBI/DBD with a select for example ... SELECT height, weight from foo where sampletime = $time ... and using one of the fetch's to get for example |dsname|value| |height|12| |weight|100| and then the challange, do the rrd update $rrd->update(time => $time, values => { "height " => 12, "weight" => 100}); One (or more) dsnames can be missing, and the order the appear may then be different) In the case I'm working on now there can be up to 12 unique dsnames. -pete -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/