Code:
[170]> rrdtool fetch gw_traffic_in_284.rrd AVERAGE -r 300 -s -1h | awk '{printf("%s,%8.2f,%8.2f \n",strftime("%c",$1),$2,$3) } '
Wed 31 Dec 1969 09:00:00 PM BRT, 0.00, 0.00
Wed 31 Dec 1969 09:00:00 PM BRT, 0.00, 0.00
Fri 10 Jul 2015 07:40:00 AM BRT,1116652.67,3080062.87
Fri 10 Jul 2015 07:45:00 AM BRT,1200892.61,2998480.57
Fri 10 Jul 2015 07:50:00 AM BRT,1048915.63,4203195.82
Fri 10 Jul 2015 07:55:00 AM BRT,952065.70,3190727.92
Fri 10 Jul 2015 08:00:00 AM BRT,1428149.07,2839789.27
Fri 10 Jul 2015 08:05:00 AM BRT,1256617.13,3290977.03
Fri 10 Jul 2015 08:10:00 AM BRT,1231392.44,2940315.11
Fri 10 Jul 2015 08:15:00 AM BRT,1207364.64,3181967.30
Fri 10 Jul 2015 08:20:00 AM BRT,1182385.48,2964647.83
Fri 10 Jul 2015 08:25:00 AM BRT,1360848.01,3149540.40
Fri 10 Jul 2015 08:30:00 AM BRT,1060095.91,2853057.13
Fri 10 Jul 2015 08:35:00 AM BRT, nan, nan
Fri 10 Jul 2015 08:40:00 AM BRT, nan, nan