#!/usr/bin/perl -w

use strict;
use lib qw( /usr/local/rrdtool-1.2.26/lib/perl );
use RRDs;

RRDs::graph "./example4.png",
    "--title=user_total_credit",
    "--start=-720d",
    "--lower-limit=0",
    "DEF:user_total0=www.primegrid.com.rrd:total:LAST",
    "DEF:user_total1=milkyway.cs.rpi.edu_milkyway.rrd:total:LAST",
    "AREA:user_total0#0066FF:PrimeGrid:STACK",
    "GPRINT:user_total0:LAST:%.2lf%s\\n",
    "AREA:user_total1#FF0000:MilkyWay\@home:STACK",
    "GPRINT:user_total1:LAST:%.2lf%s\\n";
if ( my $err = RRDs::error ) { print $err }
exit;
