[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Use of gruff, RMAgick for dynamic Graphying

Victor Reyes

3/28/2008 6:51:00 PM

[Note: parts of this message were removed to make it a legal post.]

Team,

Last year, 12/10/2007, I submitted a question (*Is there a Ruby utility for
graphing?*) about doing graph in Ruby.
I received many good suggestions and recommendations, such as: ImageMagic,
RMagick, gruff, gnuplot, JRuby SWING, Tioga, Monkeybars, shoes, Etc.
I wanted to use the tool (whichever it was) under AIX. However, I ran into
heavy roadblocks, where 99.99% of the problems were compilation issues.
Sooooooooooooo, I gave up as I only have a finite number of hours and little
experience with graphing tools.
I then decided to do the next "best" thing as permitted on my environment,
which is to use MS Windows/XP.

So I installed:

ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

gem install hoe
Need to update 21 gems from http://gems.rub...
.....................
complete
Install required dependency rubyforge? [Yn] Y
Install required dependency rake? [Yn] Y
Successfully installed hoe-1.5.1
Successfully installed rubyforge-0.4.5
Successfully installed rake-0.8.1
Installing ri documentation for hoe-1.5.1...
Installing ri documentation for rubyforge-0.4.5...
Installing ri documentation for rake-0.8.1...
Installing RDoc documentation for hoe-1.5.1...
Installing RDoc documentation for rubyforge-0.4.5...
Installing RDoc documentation for rake-0.8.1...

gem install gruff
Successfully installed gruff, version 0.3.1
Installing ri documentation for gruff-0.3.1...
Installing RDoc documentation for gruff-0.3.1...

C:\$user\downloads\Ruby and Friends>gem install monkeybars
Successfully installed monkeybars, version 0.6.0
Installing ri documentation for monkeybars-0.6.0...
Installing RDoc documentation for monkeybars-0.6.0...

I ran a sample RMagick (The Ruby way) program and a sample gruff program
from their web page.
But the problem with those tools is that they create an image which it then
needs to be displayed.
I was looking for some kind of tool to display "real time" performance data:
CPU, Memory, Paging, Network Activities, Etc. in graph format.
I could, however, display the file created by gruff or RMmagick if someone
tells me how to.
Remember, I am doing this now under Windows/XP.

So, this is a cry for help!

Thank you all for your valuable and greatly appreciated input.

Victor

5 Answers

Joel VanderWerf

3/28/2008 7:13:00 PM

0

Victor Reyes wrote:
> I was looking for some kind of tool to display "real time" performance data:
> CPU, Memory, Paging, Network Activities, Etc. in graph format.

Is Ruby/Tk an option for you? If so, there a number of ways to do this.

What about rrdtool? It's not exactly real time but you can make the
update interval small.

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Victor Reyes

3/28/2008 7:45:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

Joel,

I just took a quick look at rrdtool and I like the fact that there is binary
for AIX.
I will explore this tool and see how it goes.

Thank you for the suggestion.

Victor

On 3/28/08, Joel VanderWerf <vjoel@path.berkeley.edu> wrote:
>
> Victor Reyes wrote:
> > I was looking for some kind of tool to display "real time" performance
> data:
> > CPU, Memory, Paging, Network Activities, Etc. in graph format.
>
>
> Is Ruby/Tk an option for you? If so, there a number of ways to do this.
>
> What about rrdtool? It's not exactly real time but you can make the
> update interval small.
>
>
> --
> vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
>
>

Piyush Ranjan

3/28/2008 9:42:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

* I was looking for some kind of tool to display "real time" performance
data:
CPU, Memory, Paging, Network Activities, Etc. in graph format.*

How do you need these graphs as ? What I mean is that are these 'real time'
graphs need to be transmitted over a network or internet to some remote
machine ? You may as well use Google charts.

On Sat, Mar 29, 2008 at 1:15 AM, Victor Reyes <victor.reyes@gmail.com>
wrote:

> Joel,
>
> I just took a quick look at rrdtool and I like the fact that there is
> binary
> for AIX.
> I will explore this tool and see how it goes.
>
> Thank you for the suggestion.
>
> Victor
>
> On 3/28/08, Joel VanderWerf <vjoel@path.berkeley.edu> wrote:
> >
> > Victor Reyes wrote:
> > > I was looking for some kind of tool to display "real time" performance
> > data:
> > > CPU, Memory, Paging, Network Activities, Etc. in graph format.
> >
> >
> > Is Ruby/Tk an option for you? If so, there a number of ways to do this.
> >
> > What about rrdtool? It's not exactly real time but you can make the
> > update interval small.
> >
> >
> > --
> > vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
> >
> >
>

Phlip

3/28/2008 9:47:00 PM

0

Victor Reyes wrote:

> I was looking for some kind of tool to display "real time" performance
> data:
> CPU, Memory, Paging, Network Activities, Etc. in graph format.
> I could, however, display the file created by gruff or RMmagick if someone
> tells me how to.
> Remember, I am doing this now under Windows/XP.

The question now is what GUI - if any - you already use. I would throw these
graphs into a file-serving website ("Apache"), or a Rails site, and send out
links to them. If you have no GUI, now's the time to create one, depending
on what your customers are ready for. Otherwise, if you are only using a
command line, then I would use simple command line tools.

Install ImageMagick (yes, yet another library, but this one's very easy),
then run...

system "display #{my_image_filename}"

And be warned your Ruby app might not continue until someone closes that
display. Otherwise, you might project your image into the "Windows Picture
and Fax Viewer" using this:

system "cmd /c start #{my_image_filename}"

--
Phlip


Victor Reyes

3/29/2008 5:25:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

The data will be transmitted, at certain interval, via the network from AIX
(UNIX) to a Windows XP box, which has a 50 inches LCD display attached to
it. all servers are within the Intranet and are not accessible from the
outside world. So, real time mean perhaps every 20 or 30 secs.
Is Google Chart still possible?

Thank you

Victor

On Fri, Mar 28, 2008 at 5:42 PM, Piyush Ranjan <piyush.pr@gmail.com> wrote:

> * I was looking for some kind of tool to display "real time" performance
> data:
> CPU, Memory, Paging, Network Activities, Etc. in graph format.*
>
> How do you need these graphs as ? What I mean is that are these 'real
> time'
> graphs need to be transmitted over a network or internet to some remote
> machine ? You may as well use Google charts.
>
> On Sat, Mar 29, 2008 at 1:15 AM, Victor Reyes <victor.reyes@gmail.com>
> wrote:
>
> > Joel,
> >
> > I just took a quick look at rrdtool and I like the fact that there is
> > binary
> > for AIX.
> > I will explore this tool and see how it goes.
> >
> > Thank you for the suggestion.
> >
> > Victor
> >
> > On 3/28/08, Joel VanderWerf <vjoel@path.berkeley.edu> wrote:
> > >
> > > Victor Reyes wrote:
> > > > I was looking for some kind of tool to display "real time"
> performance
> > > data:
> > > > CPU, Memory, Paging, Network Activities, Etc. in graph format.
> > >
> > >
> > > Is Ruby/Tk an option for you? If so, there a number of ways to do
> this.
> > >
> > > What about rrdtool? It's not exactly real time but you can make the
> > > update interval small.
> > >
> > >
> > > --
> > > vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
> > >
> > >
> >
>