revdiablo has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I am looking to make some live updating charts. Think of system monitoring type apps. I'd want, say, a line chart that updates once a second with the latest data, or something along those lines. I did some cursory searching around the Monastery and CPAN, but I didn't really find anything relevant. Any ideas?

As a fallback, I can probably end up creating something with GD, Imager, Chart or one of the other charting/graphics libraries plugged into perhaps SDL for the display. I'm not sure how much work this would be, but it sounds like enough that I'd rather see if there are any more fully-baked modules or solutions out there.

Thanks to any and all for ideas.

Update: sounds like rrdtool will be good for the chart generating part. But I still need to figure out the live updating portion of this. Maybe having a window that gets redrawn by SDL will be easy enough.

Another update: I think I may not have been clear enough in my post. When I wrote "live updating", I wasn't just talking about the data being recorded once a second. I meant the chart itself updating too.

Replies are listed 'Best First'.
Re: Live or frequently updating charts
by zentara (Archbishop) on Jan 06, 2007 at 20:31 UTC
    Check out Tk Realtime data aquisition . It could be improved quite easily, like having the y axis float along with the leading edge, and you could setup a timer to snap a photo and regular intervals.

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum
      I'd go for rrdtool. there are perl bindings availale for it, or you can call it using 'system'. Monitors a hole lotta webservers for me.
Re: Live or frequently updating charts
by perrin (Chancellor) on Jan 07, 2007 at 06:24 UTC
    Sounds like you want rrdtool to me. It has a perl API that is actively supported by the author.
Re: Live or frequently updating charts
by gam3 (Curate) on Jan 07, 2007 at 13:39 UTC
    If the chart you want to make is available from rrdtools, it is very nice for things like this. RRDTool::OO is the interface to it.
    -- gam3
    A picture is worth a thousand words, but takes 200K.