Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Live or frequently updating charts

by revdiablo (Prior)
on Jan 06, 2007 at 20:06 UTC ( #593329=perlquestion: print w/replies, xml ) Need Help??
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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://593329]
Approved by Corion
Front-paged by Tanktalus
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-10-18 21:20 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (250 votes). Check out past polls.