Using SAS/Graph to Display Performance and Capacity Data - PowerPoint PPT Presentation

Loading...

PPT – Using SAS/Graph to Display Performance and Capacity Data PowerPoint presentation | free to view - id: 273c19-ZDc1Z



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Using SAS/Graph to Display Performance and Capacity Data

Description:

This presentation shows a few useful tips and information for developing graphs using SAS/Graph. ... of Performance Data James Holtman, CMG2005. Used without ... – PowerPoint PPT presentation

Number of Views:73
Avg rating:3.0/5.0
Slides: 50
Provided by: regio6
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Using SAS/Graph to Display Performance and Capacity Data


1
Using SAS/Graph to Display Performance and
Capacity Data
Richard S. Ralston
2
Abstract
This presentation shows a few useful tips and
information for developing graphs using
SAS/Graph. The presentation then focuses on
building and using heat charts to display
performance and capacity data in an interesting
and usable manner. Heat charts provide the
ability to visualize 3 dimensional data in 2
dimensions. The techniques used are platform
independent, although the work was done on the
z/OS platform.
3
What You Need to Develop Graphs
  • SAS Base
  • SAS Graph
  • Online Resources A list at the end and
    throughout this presentation
  • Patience!!

4
Useful Stuff
  • ODS
  • Styles
  • GOPTIONS
  • Generating a Graph
  • Colors
  • Better Axis Labels

5
ODS (Output Delivery System) 1
  • Provides enhanced formatting and report grouping
    capability for SAS output
  • Part of SAS base
  • Version 7 and earlier was printer oriented
  • PDF was an option
  • Started in SAS version 8
  • Build Web output (HTML, Java, etc.)
  • In SAS 9 and beyond ODS becomes even more
    essential for delivering output
  • ODS provides the structure and format for output
  • Good Source Output Delivery System The Basics,
    Lauren E. Haworth, SAS Publishing, 2001
  • Online SAS 9 manuals available at
    http//support.sas.com/onlinedoc/913/docMainpage.j
    sp

6
ODS 2
ODS HTML BODY"CECLPBY
(URL"'RSR1413.CAPRPTS.HTML(CECLPBY)'")
CONTENTS"CECLPBYC
(URL"'RSR1413.CAPRPTS.HTML(CECLPBYC)'")
FRAME"CECLPBYF"
(URL"'RSR1413.CAPRPTS.HTML(CECLPBYF)'"
TITLE"CPC CPU
Utilization By LPAR" )
PATHsasrpt GPATHsasgif
(URL"'RSR1413.CAPRPTS.GIF(CE
CLPBY)'") ANCHOR"ANCHOR"
RECORD_SEPERATORNONE
GTITLE
STYLEstyles.test


Sample ODS HTML Statement, z/OS oriented for PDSE
7
ODS 3
ODS LISTING CLOSE Insert graph proc here ODS
HTML CLOSE ODS LISTING
8
Style Templates
  • Define the style (look) of the output
  • Handful of predefined Styles
  • Not well documented
  • PROC TEMPLATE used to create/modify styles
  • http//support.sas.com/rnd/base/topics/templateFAQ
    /Template.html
  • Output Delivery System The Basics, Lauren E.
    Haworth, SAS Publishing, 2001
  • Instant ODS Style Templates for the SAS Output
    Delivery System, Bernadette Johnson, SAS
    Publishing, 2003
  • Web Development with SAS by Example, Frederick E.
    Pratter, SAS Publishing, 2003

9
Graphics Options
  • MACRO gopts (x1000,y620)
  • GOPTIONS RESETALL
  • GOPTIONS DEVICEGIF NOCHARACTERS
  • GUNITPT
  • AUTOSIZEOFF
  • BORDER
  • CTEXT BLUE
  • CBACK WHITE
  • XPIXELSx
  • YPIXELSy
  • HTEXT 10
  • HTITLE 16
  • COLORS(BLACK RED GREEN BLUE PURPLE
    VIOLET ORANGE YELLOW PINK
  • CYAN MAGENTA BROWN GOLD LIME
    GRAY LILAC MAROON SALMON
  • TAN CREAM LTGRAY
  • VILG /vivid yellow green/
  • VIG /vivid green/
  • STR /strong red/
  • MOOL /moderate olive/

10
Generating a Graph
  • gopts
  • TITLE1 COLORBLUE HEIGHT14 'MSU Usage'
  • TITLE2 COLORBLUE HEIGHT11 "daydate"
  • FOOTNOTE1 JUSTIFYLEFT COLORBLUE HEIGHT8
    FONTSWISS
  • 'Source SMF/MICS DETAIL2.HARCPUnn
    Data'
  • SYMBOL1 COLORMAGENTA
  • INTERPOLJOIN
  • HEIGHT5
  • VALUEDOT
  • SYMBOL2 COLORGREEN
  • INTERPOLJOIN
  • HEIGHT5
  • VALUEDIAMOND
  • SYMBOL3 COLORORANGE
  • INTERPOLJOIN
  • WIDTH2
  • VALUENONE
  • SYMBOL4 COLORRED
  • INTERPOLJOIN
  • AXIS2 ORDER('000000'T TO '240000'T BY
    '010000'T)
  • VALUE(ANGLE90 FONTSWISS HEIGHT9)
  • LABEL(FONTSWISSB HEIGHT12 'Time of
    Day')
  • LEGEND1 FRAME CBORDERBLUE LABELNONE
    VALUE(HEIGHT8 FONTSWISSB)
  • PROC GPLOT DATAlpar
  • PLOT (lparlac lparused lpardef lparmsu)time /
  • NAME'MSULP'
  • DES'BYVAL(lparname)'
  • OVERLAY
  • HAXISAXIS2
  • VAXISAXIS1
  • HMINOR3
  • VMINOR9
  • VZERO
  • AUTOVREF
  • LVREF1
  • CVREFBLUE
  • CAXISBLUE
  • CTEXTBLUE

11
Graphics Web Page
12
Colors
  • GIF defaults to Black, Red, Green, Blue, Cyan,
    Magenta, Gray, Pink, Orange, Brown, White
  • Broad spectrum of colors available
  • Specify the ones you want in GOPTIONS
  • Already demonstrated
  • http//support.sas.com/onlinedoc/913/getDoc/en/gra
    phref.hlp/colors-specify-color.htm
  • Good Documentation
  • http//ftp.sas.com/techsup/download/sample/graph/o
    ther-colors.html
  • Program to display a palette of colors - FULLPALT
  • Autolib member COLORMAC
  • Macros to custom define colors

13
FULLPALT - Output
16 pages of output, Run in PC SAS
14
COLORMAC - Color Definition Macros
  • Define custom colors
  • Macro is in SAS Autolib
  • Contains many macros to help define colors
  • Documentation is inside COLORMAC
  • One line of source code is gt 72 characters
  • To access from z/OS use the following code to
    load it
  • LET OPT_S2 SYSFUNC(GETOPTION(S2)) / GET
    CURRENT S2 OPTION /
  • OPTIONS S20 / RESET
    TO ZERO /
  • INCLUDE 'SAS.AUTOLIB(COLORMAC)'
  • OPTIONS S2OPT_S2 /
    RESTORE OPTION /
  • / now you can invoke macros from COLORMAC
    member /

Thanks to Scott Barry SBBWorks, Inc.
15
Workload Utilization - Traditional
16
Workload Utilization - Better
17
X Axis code
MACRO xaxis DO i1 TO 124 laxisi
END MEND xaxis DATA _NULL_ DO i 1 to
124 IF MOD(i,4) 0 THEN DO qi/4
IF qgt24 THEN qq-24 CALL SYMPUT('laxis
LEFT(i),"' TRIM(LEFT(PUT(q,2.))) "'")
END ELSE CALL SYMPUT('laxis LEFT(i),"'
' "'") END
AXIS2 ORDER("begxg"DT TO "endx"DT BY
'001500'T) LABEL(HEIGHT10 FONTSWISSB
'Time of Day') VALUE(HEIGHT7 FONTSWISS
xaxis)
18
Heat Chart!
The chart uses colorto represent ranges of
values. The colors in this example range from
blue (cool colors) for low values to reds
(intense) for high values. You can display a lot
of data in a single chart.
Visualization of Performance Data James
Holtman, CMG2005
Used without permission
19
Value of Heat Charts
  • Show 3 dimensional data in 2 dimensions
  • Visual representation
  • Quick view of data
  • Youve seen them for temperature maps of the US
    in Newspapers
  • They have also been
  • used in topographic maps
  • to show altitude.

20
Currently Developed and Used Heat Charts
  • Monthly CPU Utilization
  • By LPAR
  • BY CEC
  • Month to Date CPU Utilization
  • 30 Busiest DASD Devises
  • Daily by SYSPLEX and LPAR
  • MSU Usage by Workload
  • Daily by LPAR
  • WLM Service Class Performance Index
  • Daily by LPAR

21
z/Series CPU Usage Heat Charts
22
Monthly LPAR MSU Usage
23
Monthly CPC MSU Usage
24
Month to Date Views
25
Busy Disks 1
26
Busy Disks 2
27
Busy Disks 3
28
Workload Utilization Heat Chart
29
WLM Service Class Performance Index
30
How Do You Make a Heat Chart?
  • Not a lot of SAS documentation available
  • Started with PROC GCONTOUR
  • Doesnt work right
  • Will develop the table ranges correctly, but if
    no data exists for a given data range, GCONTOUR
    will slide down the color symbols list
  • Example For 20 levels if there is no data for
    level 10 then level 11 gets the level 10s color,
    level 12 get sthe level 11 color, etc. however
    the legend shows all level colors correctly
  • SAS problem
  • Tips and Tricks Using SAS/Graph Effectively
  • A. Darrell Massengill, SAS
  • http//www2.sas.com/proceedings/sugi30/090-30.pdf
  • http//support.sas.com/rnd/papers/sugi30/sasgraph_
    src.zip - source code for graphs in paper

31
GCONTOUR Sample
PROC GCONTOUR example 4.
32
Inspiration!
33
Spectrum.sas Output
34
Determining Heat Range Colors
35
Heat Range Colors
  • GOPTIONS DEVgif
  • COLORS(BWH /bluish white/
  • VPAB /very pale blue/
  • VLIB /very light blue/
  • LIB /light blue/
  • STB /strong blue/
  • PALG /pale yellow green/
  • LILG /light yellow green/
  • BILG /brilliant yellow green/
  • VILG /vivid yellow green/
  • GREEN
  • cns (light yellow)
  • GOLD
  • cns (yellowish orange)
  • ORANGE
  • cns (reddish orange)
  • LIYPK /Light yellowish pink/
  • STYPK /strong yellowish pink/
  • VIYPK /vivid yellowish pink/
  • RED
  • STR /strong red/
  • WHITE
  • BLACK)

The cns macro is defined in the COLORMAC macro
definitions. The best usage documentation is
inside COLORMAC.
36
Building Heat Charts
  • Customized levels for each chart requires a
    separate invocation of PROC GPLOT for each chart.
  • Build a macro to generate heat charts,
    customizing the axis's and legend (levels)
  • Using PROC GPLOT
  • Assume each level is a separate line
  • Plotting 20 lines (1 per level) maximum
  • No connecting line between points
  • 20 overlapping scatter plots

37
Code
1
  • Determine level
  • PROC SUMMARY DATAcpusage
  • VAR hwmsu
  • BY sysname
  • OUTPUT MAX(hwmsu)maxhwmsu
  • OUTmaxmsu
  • DATA cpusage2
  • MERGE cpusage maxmsu
  • BY sysname
  • levelINT(usedmsu/(maxhwmsu/20))1
  • incrmaxhwmsu/20
  • levelINT(usedmsu/ROUND(maxhwmsu/20))1
  • IF level21 THEN level20

38
Code
2
  • Graphics Setup
  • FOOTNOTE1 JUSTIFYLEFT COLORBLUE HEIGHT8
    FONTSWISS
  • 'Source SMF/MICS DETAIL2.HARCPU99/WLMSEC99
    Data'
  • AXIS1 LABEL(HEIGHT12 FONTSWISSB 'Time of Day')
  • ORDER('000000'T TO '240000'T BY
    '10000'T)
  • MINOR(NUMBER3 COLORBLUE)
    MAJOR(COLORBLUE)
  • VALUE(ANGLE90 FONTSWISS HEIGHT9)
  • AXIS2 VALUE(FONTSWISS HEIGHT8)
    MAJOR(COLORBLUE)
  • ORDER("sdate"D TO "edate"D) MINORNONE
  • LABEL(ANGLE90 HEIGHT12 FONTSWISSB
    'Date')
  • TITLE1 COLORBLUE HEIGHT16 FONTSWISSB
  • 'Monthly Plot of MSU Usage'
  • TITLE2 COLORBLUE HEIGHT14 FONTSWISSB
  • "For the Month of month year"
  • SYMBOL1 INTERPOLNONE VALUEU FONTMARKER H8.5
  • MACRO lgnd
  • DO i1 TO 20
  • lvali

lgnd macro used to display legend values.
39
Code
3
  • MACRO heat (system)
  • DATA plot2
  • SET cpusage2 ENDeof
  • IF sysname"system" THEN OUTPUT
  • IF eof THEN DO
  • date"edate"D
  • time.
  • sysname"system"
  • DO level 1 to 20
  • OUTPUT
  • END
  • END
  • DATA _NULL_
  • SET plot2
  • BY date
  • IF onetime THEN DO
  • RETAIN onetime 1
  • onetime0
  • CALL SYMPUT('maxmsu',PUT(maxhwmsu,6.))

Build Chart Macro
Prime the data with a data point for each level
to guarantee all will be used.
Build the legend values.
40
Code
4
  • LEGEND1 FRAME CBORDERBLUE VALUE(HEIGHT9
    FONTSWISS lgnd)
  • LABEL(HEIGHT9 FONTSWISSB 'Used HW
    MSUs')
  • TITLE3 COLORBLUE HEIGHT12 FONTSWISSB
    "sysname"
  • LET daysSYSEVALF("edate"D-"sdate"D1)
  • LET note1
  • IF dayslt31 maxmsult1000 THEN DO
  • LET loopSYSEVALF(31-days)
  • DO i1 TO loop
  • LET noteEVAL(note1)
  • FOOTNOTEnote FONTSWISS HEIGHT9 ' '
  • END
  • END
  • IF dayslt30 maxmsugt1000 THEN DO
  • LET loopSYSEVALF(30-days)
  • DO i1 TO loop
  • LET noteEVAL(note1)
  • FOOTNOTEnote FONTSWISS HEIGHT9 ' '
  • END
  • END

Adding footnotes to fill up the graph area. In
some cases, thin white lines appeared between
the rows.
41
Code
5
  • PROC GPLOT DATAplot2
  • PLOT datetimelevel /
  • SKIPMISS
  • AUTOVREF
  • VZERO
  • NAME'MHEAT'
  • DES"sysname"
  • HAXISAXIS1
  • VAXISAXIS2
  • LVREF1
  • CVREFWHITE
  • CAXISBLUE
  • CTEXTBLUE
  • LEGENDLEGEND1
  • RUNQUIT
  • IF notegt1 THEN DO
  • FOOTNOTE2 /Remove extra footnotes /
  • END
  • MEND heat

42
Code
6
  • ODS LISTING CLOSE
  • / SYSA /
  • heat (systemSYSA)
  • / SYSD /
  • ODS PROCLABEL' '
  • heat (systemSYSD)
  • / SYSF /
  • ODS PROCLABEL' '
  • heat (systemSYSF)
  • / SYSI /
  • ODS PROCLABEL' '
  • heat (systemSYSI)
  • / SYSS /
  • ODS PROCLABEL' '
  • heat (systemSYSS)
  • /wrap up/
  • ODS HTML CLOSE
  • ODS LISTING

Invoke macro for each chart
43
Disk Code 1
  • drive devaddr '-' volser
  • ....
  • PROC SORT DATAdvamax
  • BY sysname drive
  • DATA dvamax
  • RETAIN ricknum
  • SET dvamax
  • BY sysname drive
  • IF FIRST.sysname THEN ricknum0
  • ricknum1
  • ....
  • MACRO yaxis
  • DO i1 TO tot
  • yaxisi
  • END
  • MEND yaxis
  • ....

The y axis values must be numeric for plotting.
Therefore they are assigned a value (ricknum).
yaxis macro to place real y axis labels on the
axis.
44
Disk Code 2
  • DATA _NULL_
  • SET plot2 ENDeof
  • BY ricknum
  • IF onetime THEN DO
  • RETAIN onetime 1
  • onetime0
  • CALL SYMPUT('sysname',PUT(sysname,4.))
  • incrmaxsscrt/20
  • DO i 1 to 20
  • CALL SYMPUT('lval'LEFT(i),
  • "'"'lt 'TRIM(LEFT(PUT(ROUND(iincr
    ),COMMA6.)))"'")
  • END
  • END
  • IF FIRST.ricknum THEN
  • CALL SYMPUT(yaxis'LEFT(ricknum),"'"TRIM(LE
    FT(drive))"'")
  • IF eof THEN DO
  • CALL SYMPUT('tot',LEFT(ricknum))
  • END
  • RUN

Building legend values for the lgnd macro.
Assign y axis labels for the yaxis macro.
45
Disk Code 3
  • LEGEND1 FRAME CBORDERBLUE VALUE(HEIGHT9
    FONTSWISS lgnd)
  • LABEL(HEIGHT9 FONTSWISSB 'Start IOs
    per Second')
  • AXIS2 VALUE(FONTSWISS HEIGHT8 yaxis)
  • ORDER(1 TO tot BY 1) MINORNONE
    MAJOR(COLORBLUE)
  • LABEL(ANGLE90 HEIGHT10 FONTSWISSB 'Disk
    Drive')
  • .... Similar PROC GPLOT code goes here

46
Where Am I Going Next
  • Templates
  • Convince SAS that GCONTOUR has a problem
  • Keep refining heat range colors ranges
  • Other Uses
  • Monthly MTD views of various applications
  • CICS DB2 transaction volumes
  • Daily top 30 Transactions
  • Monthly MTD usage patterns
  • Response time?
  • Temp/workspace usage?

47
Thanks!
  • Patricia Wingfield
  • Scott Barry
  • Al Sherkow
  • James Holtman
  • Various SAS support people

48
Contact info
  • rralston_at_humana.com
  • cyclotourist_at_bellsouth.net

49
Additional Documentation Sources
  • SAS Documentation - http//support.sas.com/onlined
    oc/913/docMainpage.jsp
  • SAS Michael Hines, Richard S. Ralston -
    http//www.cmg.org/measureit/issues/mit35/m_35_11.
    html
  • Show Your Graphs and Tables at Their Best on the
    Web with ODS, Francesca Pierri, LeRoy Bessler -
    http//www2.sas.com/proceedings/sugi27/p220-27.pdf
  • Web Communication Effectiveness Design and
    Methods to Get the Best out of ODS, SAS, and
    SAS/Graph, LeRoy Bessler - http//www2.sas.com/pro
    ceedings/sugi28/130-28.pdf
  • Inform and Influence with Image and Data
    Communication-effective Web Design for ODS, SAS,
    and SAS/Graph, LeRoy Bessler - http//www2.sas.com
    /proceedings/sugi27/p139-27.pdf
About PowerShow.com