2

I'm looking to create graphs from data in a MySQL database using Python and RRD. I see that there are two RRD interfaces:

Is there a general preference/reason to choose one over the other? I know that PyRRD is written in Python, so that might be the way to lean, but I'd like to get the community input.

Thanks

Larry G. Wapnitsky
  • 1,216
  • 2
  • 16
  • 35
  • 1
    Your data is already in Mysql? and you want to put it into an RRD? Why not graph it directly from SQL? – Doon May 01 '12 at 14:11
  • @Doon - I'm new to the graphic aspect. What would you recommend? – Larry G. Wapnitsky May 01 '12 at 14:12
  • Would need to know more about your End Goal? What is the data you are trying to graph/visualize. What is the desired output? Webpage? etc. RRD is a Round Robin Database, it does have a graph component, that allows you to easily visualize data in it, but unless you already have RRDs, shoehorning Data into them to just use the graph routines is a bit overkill. As for your 2 choices pyrrd is more python like better, whereas the python rrdtool are just a thin wrapper. – Doon May 01 '12 at 16:55
  • 1
    @Doon - Thanks. I think I've decided on matplotlib. It seems to do everything I need. – Larry G. Wapnitsky May 01 '12 at 18:09

1 Answers1

0

While RRDTool is capable of pulling data from a DBI (eg MySQL) source instead of its own RRD files, it is usually better to use a different graphing package if you find yourself in this situation. However this was not the original question...

As for RRDTool (the shell interface) vs PyRRD (the Python interface), they are both interfaces to the same underlying library functions; there also exist interfaces for Perl, Ruby, PHP, and several other languages. The underlying code is the same, so it only depends on which language you prefer to write in. Generally, you'd expect using the C/C++ library to be a little faster, and forking off to the command-line interface slower, but the final outcome is the same and so it will depend on your preferred language.

Steve Shipway
  • 3,754
  • 3
  • 22
  • 39