Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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 ( [id://1069689]=note: print w/replies, xml ) Need Help??


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

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?
  • Comment on Re^2: Halogen: A Tool For Monitoring IBM pSeries LPAR and Hypervisor Metrics

Replies are listed 'Best First'.
Re^3: Halogen: A Tool For Monitoring IBM pSeries LPAR and Hypervisor Metrics
by dmitri (Priest) on Jan 08, 2014 at 03:17 UTC
    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.

      Cheers,

      Bowie

Re^3: Halogen: A Tool For Monitoring IBM pSeries LPAR and Hypervisor Metrics
by jdporter (Paladin) on Jan 08, 2014 at 04:10 UTC

    Why are you posting under two different accounts?

      At some point between 2001 and now, I forgot I had the earlier account..so 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! :)
        but i'm not aware of any way to close it!

        Did you ever ask?

        Change your password to 0 (zero). Read the announcement.

        I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1069689]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 09:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found