I noticed that if I specify the start as '0' then it will get the 
current date at midnight. Is this true or is my code figuring this out 
coincidently? I was trying to graph the current day's statistics 
starting at midnight, which below it ends up working, but I am not sure 
if this is the correct way to go about this.

       
        my $res = 60*60*24;

        # Start at today
        #my $time = time;
        #my $start_t = $time - ($time % $res);

        #my $start_t_res = int($start_t/$res)*$res;
        my $start_t_res = 0;
        #End on Today's Date
        #my $end_t = "(int($start_t/$res)*$res)";

        my ($start,$step,$names,$data) = 
RRDs::fetch("stats.rrd","AVERAGE","-r","$res","-s", 
"$start_t_res","-e","now");

Thanks,
Laura

_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

Reply via email to