#!/usr/bin/perl

use RRDs;
my $LOAD = '';
my $CMD = "awk '{print \$1\":\"\$2\":\"\$3}' < /proc/loadavg";
$LOAD=`$CMD`;
chomp($LOAD);
RRDs::update ("/var/log/rrd/load.rrd",
	"-t", "load1:load5:load15",
	"N:$LOAD");

my $ERROR = RRDs::error;
print "$ERROR\n" if $ERROR;
