CSV output from RRD data?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply
Author
Message
solarix
Posts: 20
Joined: Wed Nov 28, 2001 7:00 pm

#1 Post by solarix » Fri Jan 18, 2002 7:18 pm

I know I have seen the ability to get csv data from an rrd database but can not find where I saw it...

Any suggestions?

Guest

#2 Post by Guest » Fri Jan 18, 2002 8:38 pm

It is easy to dump .RRD to .XML via the RRDTOOL command itself. Perhaps you can convert from XML to CSV more easily...

solarix
Posts: 20
Joined: Wed Nov 28, 2001 7:00 pm

#3 Post by solarix » Fri Jan 18, 2002 8:41 pm

I was hoping for a procedure that verified that the data was correct (someone else tested it...)

What I came up with is:
passthru ("/opt/rrd/bin/rrdtool dump
/www/htdocs/changed/internal/rrd/rra/SMS_in.rrd|grep -v NaN
| grep '<row>' | tr e ' '
|awk {'print "Q"$2"qcq"$3"qcq"$9"Q"'}
| tr Q '"'|tr c ','|tr q '"'");

This is a php statement...



<font size=-1>[ This Message was edited by: solarix on 2002-01-18 21:43 ]</font>

Post Reply