Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Halogen: A Tool For Monitoring IBM pSeries LPAR and Hypervisor Metrics

by dmitri (Priest)
on Jan 03, 2014 at 05:36 UTC ( #1069083=note: print w/replies, xml ) Need Help??

in reply to Halogen: A Tool For Monitoring IBM pSeries LPAR and Hypervisor Metrics

Thank you for this article. I found it inspiring.

On a side note, I love how those graphs look. Which module(s) were used to make them? Can you share a little more about that?

  • Comment on Re: Halogen: A Tool For Monitoring IBM pSeries LPAR and Hypervisor Metrics

Replies are listed 'Best First'.
Re^2: Halogen: A Tool For Monitoring IBM pSeries LPAR and Hypervisor Metrics
by Bowie J. Poag (Initiate) on Jan 07, 2014 at 19:34 UTC
    At one point, I wrote up a pretty lengthy reply... But i'm not seeing it here.. Did I send it to you as a private message on accident?
      No, sorry, I do not have any message from you.
        Ok.. I'll recap.

        All the graphs are generated in the script via simple calls to a gnuplot binary. No Perl modules used at all. We've been using gnuplot for a long time where I work, so, we've managed to both find good ways of wrangling it, and find ways of making it pretty. It's a clever little bit of code.. Have a look:

        open (GNUPLOT, "|gnuplot 2>/dev/null 1>/dev/null"); print GNUPLOT <<EOF; set term png transparent size 1000,220 x000000 xaaaaaa x202020 x90 +9090 x88ff88 xffffff xfffffe x000000 x505050 set title "Halogen: Number of pSeries Systems Exceeding CPU Panic +Threshold \(Starting: $rangeStart Ending: $rangeEnd\)" textcolor lt 2 set output "/var/www/html/spectrum/halogen-spectrum.png" set mxtics 2 set xtics 300 set grid unset key set xdata time set timefmt "%Y-%m-%d %H:%M:%S" set format x "%H:%M" set yrange ["$yNeg" : "$yPos"] set xrange ["$rangeStart" : "$rangeEnd"] set pointsize 0.9 set multiplot plot "/var/www/html/halogen/data.txt" using 1:3 w linespoints lt 6 + pt 7, "/var/www/html/halogen/data.txt" using 1:3 smooth bezier w lin +es lw 1 lt 2 EOF close (GNUPLOT);

        In Perl, we're basically opening a pipe to the gnuplot command and funneling it the native command syntax it understands...The print call will continue until an EOF is received. When it hits EOF, the print call closes, we close the pipe, the binary kicks off, and whammo, you've got a graph sitting in a filesystem ready to go.

        We've even managed to get our graphs to look fairly anti-aliased, something which stock gnuplot doesn't support (without being compiled against libgd/cairo libraries, at least)...All you do is just generate the graph at a resolution higher than you expect to see it on a webpage..and make sure the img tag used for the graph is hard-coded with a specific width or height smaller than the physical resolution of the image, and the browser handles the task of doing a quick cubic downscaling of the image. Looks much better that way.



      Why are you posting under two different accounts?

        At some point between 2001 and now, I forgot I had the earlier I made a new one, and worked with it. Since then, I found the other, but i'm not aware of any way to close it! :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1069083]
and the fire pops...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2017-07-21 03:52 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (318 votes). Check out past polls.