Measure User’s Guide Abstract This manual describes how to use the Measure performance monitor to collect and examine data, through either a command interface or programmatic interface. This manual is for system operators, system managers, and analysts who balance and tune HP NonStop™ systems. Product Version Measure D45 and G12 Supported Release Version Updates (RVUs) This manual supports D40.00 and all subsequent D-series RVUs and G06.
Document History Part Number Product Version Published 425663-001 Measure D45 Measure G08 July 2000 427634-001 Measure D45 Measure G09 April 2001 520560-001 Measure D45 Measure G10 August 2002 520560-002 Measure D45 Measure G11 April 2004 520560-003 Measure D45 Measure G12 December 2004
Measure User’s Guide Index Examples What’s New in This Manual vii Manual Information vii New and Changed Information G10 PVU Changes ix G09 PVU Changes ix About This Manual xi Introduction xi Who Should Use This Manual What Is in This Manual xi Examples in This Manual xii Related Reading xii Notation Conventions xiv Figures Tables viii xi 1.
1. Introduction to Measure (continued) Contents 1. Introduction to Measure (continued) MEASIMMU 1-6 MEASMON 1-6 OMEASG 1-7 OMEASP 1-7 RMEASP 1-7 Relationship Between the Measure Components 1-8 2.
4. Formatting Reports and Plots Contents 4.
. Creating a Custom Measurement Application (continued) Contents 6.
B. Examples of RECORD Statements and FIND Queries Contents B. Examples of RECORD Statements and FIND Queries C. Loading Measure Data Into an SQL Table D. Example of Measurement Application in C E. Converting Existing Applications or Enform Reports to ZMS Style Record Formats Using New Counter Fields E-1 Using Existing Counter Fields E-1 Application Conversion Considerations E-2 Index Examples Example 4-1. Example 4-2. Example 4-3. Example 4-4. Example 4-5. Example 4-6. Example 4-7. Example 4-8.
Examples Contents Examples Example 6-2. Example 6-3. Example 6-4. Example 6-5. Example 6-6. Example A-1. Example A-2. Example A-3. Example A-4. Example A-5. Example B-1. Example B-2. Example B-3. Example B-4. Example B-5. Example B-6. Example D-1.
What’s New in This Manual Manual Information Measure User’s Guide Abstract This manual describes how to use the Measure performance monitor to collect and examine data, through either a command interface or programmatic interface. This manual is for system operators, system managers, and analysts who balance and tune HP NonStop™ systems. Product Version Measure D45 and G12 Supported Release Version Updates (RVUs) This manual supports D40.00 and all subsequent D-series RVUs and G06.
New and Changed Information What’s New in This Manual New and Changed Information This publication has been updated to reflect new product names: • • Since product names are changing over time, this publication might contain both HP and Compaq product names. Product names in graphic representations are consistent with the current product interface.
G10 PVU Changes What’s New in This Manual G10 PVU Changes This publication edition contains these changes for the G10 Measure PVU: • Added the new entities OSSCPU and OSSNS to: ° ° ° ° • The table in Measurable Resources on page 1-2 The table in Entity Types and Specifications on page 3-2 Table 6-2, MEASDECS Entity Descriptors, on page 6-4 The command descriptions throughout Section 2, Measure Command Interface (MEASCOM) Added LISTOSSNAMES, LISTGNAME, LISTPNAME, OSSPATH, and PAGESIZE to Table 2-1, M
Changed Entities What’s New in This Manual ° ° ° START MEASUREMENT STATUS MEASSUBSYS STATUS MEASUREMENT Changed Entities • • • • • • • DISCOPEN DISKFILE PROCESS PROCESSH SQLPROC SQLSTMT USERDEF Callable Interface Changes and Additions • • New callable interfaces: ° MEASLISTGNAME translates an OSS file pathname to its Guardian file name equivalent and MID content. ° MEASLISTOSSNAMES lists OSS file pathname information to the file OSSNAMES.
About This Manual Introduction This manual explains how to use the Measure performance monitor to collect and display system performance data. This manual provides information for: Server Type Product Version Supported RVUs HP NonStop K-series Measure D40 and later D40.00 and later D4x RVUs HP NonStop S-series Measure G06.03 and later G06.
Examples in This Manual About This Manual Section Title This section...
For All RVUs About This Manual Manual Describes... PEEK Reference Manual How to use PEEK to produce dynamically updated statistical views of a system. Guardian Disk and Tape Utilities Reference Manual How to use DSAP to examine disk activity. Guardian Programmer’s Guide Provides programming information for the NonStop operating system. Guardian Procedure Calls Reference Manual Syntax and programming considerations for system procedures.
For D-Series RVUs About This Manual For D-Series RVUs Manual Describes... Availability Guide for Performance Management General principles of performance management on NonStop systems. It also describes a number of performance management tools. Surveyor User’s Guide The Surveyor performance database manager, which uses Measure files to create a database of performance information.
General Syntax Notation About This Manual UPPERCASE LETTERS. Uppercase letters indicate keywords and reserved words; enter these items exactly as shown. Items not enclosed in brackets are required. For example: MAXATTACH lowercase italic letters. Lowercase italic letters indicate variable items that you supply. Items not enclosed in brackets are required. For example: file-name computer type.
Notation for Messages About This Manual … Ellipsis. An ellipsis immediately following a pair of brackets or braces indicates that you can repeat the enclosed sequence of syntax items any number of times. For example: M address-1 [ , new-value ]... [ - ] {0|1|2|3|4|5|6|7|8|9}... An ellipsis immediately following a single syntax item indicates that you can repeat that syntax item any number of times. For example: "s-char..." Punctuation.
Notation for Messages About This Manual lowercase italic letters. Lowercase italic letters indicate variable items whose values are displayed or returned. For example: p-register process-name [ ] Brackets. Brackets enclose items that are sometimes, but not always, displayed. For example: Event number = number [ Subject = first-subject-value ] A group of items enclosed in brackets is a list of all possible items that can be displayed, of which one or none might actually be displayed.
Notation for Messages About This Manual Measure User’s Guide —520560-003 xviii
1 Introduction to Measure The Measure performance monitor is a data collection and measurement tool that provides a wide range of performance statistics on system resources. You can use the Measure performance monitor to gather information from systems, network components, and your own business applications. You then use the Measure data to balance and tune your system, detect problem areas or inefficiencies, balance workloads, evaluate sizing for new applications, or for capacity planning.
Continuous Operation and Measurement Introduction to Measure • • HP NonStop Transaction Management Facility (TMF) transactions User-defined processes You select the resources to measure and the time frame for data collection. You can include any combination of measurable resources in a measurement configuration. You can start or stop measurements at any time. The Measure performance monitor’s predefined counters give a comprehensive picture of each resource’s performance characteristics.
Displays of Measurement Data Introduction to Measure CPU FILE OSSNS SQLSTMT DEVICE LINE PROCESS SYSTEM DISC NETLINE PROCESSH TERMINAL For each entity type you specify for measurement, information is gathered by a set of predefined counters. For example, if you specify a CPU entity type, predefined counters collect information such as CPU busy time, interrupt busy time, number of pages swapped, and so on.
Introduction to Measure Measure Support for Open System Services (OSS) Because multiple measurements can run concurrently, you can collect data with your custom tools at the same time you are collecting data using MEASCOM. The user-defined counters give you a structure to further customize your own products. You can use these counters to measure application events and write the collected data to data files generated by Measure.
MEASCHMA Introduction to Measure To find the subvolume name for SYSnn on your system, use the TACL STATUS * command. SYSnn is the subvolume that contains the OSIMAGE file. Note. The MEASCTL, MEASFH, and MEASMON processes must be on the active system subvolume (SYSnn). Other Measure files can be located on other subvolumes. MEASCHMA The MEASCHMA file contains the structure declarations for C and TAL. Its output is similar to the output of the MEASDECS file.
MEASDDLZ Introduction to Measure MEASDDLZ In Measure G11 and later PVUs, the MEASDDLZ file contains ZMS-style record templates using legacy-style naming for records and field access. MEASDDLZ is a temporary migration aid for applications moving to use of ZMS-style records. MEASDECS The MEASDECS file contains the structure declarations and literal value definitions used by the Measure callable procedures. MEASFH MEASFH is the measurement data file-handler process.
OMEASG Introduction to Measure OMEASG The OMEASG system library file contains the Measure callable procedures used by the operating system. OMEASG is included in the system library by the SYSGEN program. OMEASP The OMEASP system library file contains the Measure callable procedures used by applications (system-library procedures) for TNS systems. OMEASP is included in the system library by the SYSGEN program.
Relationship Between the Measure Components Introduction to Measure Relationship Between the Measure Components Figure 1-1 shows the relationship between the Measure components. For a description of how the components operate together to measure system resources, see Section 2, Measure Command Interface (MEASCOM), and Section 3, Configuring and Running Measurements. Figure 1-1.
2 Measure Command Interface (MEASCOM) Use the Measure command interface (MEASCOM) to start and stop the Measure subsystem, start and stop measurements, configure measurements, display and plot measurement data, and generate structured files of measurement data for use by other report-writing products.
Command-Language Format Measure Command Interface (MEASCOM) Table 2-1 summarizes all MEASCOM commands. Most of these commands are described, with examples of their use, in Sections 3 through 5 of this manual. For complete descriptions of all commands, see the Measure Reference Manual. Table 2-1. MEASCOM Commands (page 1 of 3) Command Object Function Controlling the Subsystem START MEASSUBSYS Starts the Measure subsystem. STATUS MEASSUBSYS Displays information about the Measure subsystem.
Command-Language Format Measure Command Interface (MEASCOM) Table 2-1. MEASCOM Commands (page 2 of 3) Command Object Function Plotting Data (continued) INFO PLOT Displays information about the counters selected for plotting. LIST PLOT Displays a plot of selected counters. RESET PLOT Returns plot format options to their default values. SET PLOT Sets plot format options. SHOW PLOT Displays plot format options.
Entering Commands Measure Command Interface (MEASCOM) Table 2-1. MEASCOM Commands (page 3 of 3) Command Object Function OBEY Executes any file containing valid MEASCOM commands. RUN Runs another process from within a MEASCOM session. SYSTEM Sets default system. VOLUME Sets default volume and subvolume. ! Retrieves and immediately reexecutes previously entered MEASCOM commands. Tracking MEASCOM Sessions ENV Displays environment parameter settings. EXIT Ends MEASCOM session.
Measure Command Interface (MEASCOM) Using Abbreviations in Commands Using Abbreviations in Commands When you enter MEASCOM commands interactively (at the + prompt), you can abbreviate the keywords for commands, objects, attributes, and counter names. For example, instead of entering STATUS MEASUREMENT, you can enter STAT MEASU. • MEASCOM matches abbreviations word by word and gives priority to exact matches.
Measure Command Interface (MEASCOM) Starting and Stopping the Measure Subsystem Starting and Stopping the Measure Subsystem The Measure subsystem must be installed and operating before you can use the Measure command interpreter or callable procedures to configure and run measurements and display measurement data in active data files or counter space. To display only data in inactive data files, you do not need to start the subsystem.
Measure Command Interface (MEASCOM) Starting and Stopping MEASCOM To list the currently active measurements before stopping the Measure subsystem: 43> MEASCOM MEASURE Performance Monitor - T9086G10 - (16DEC03) - \HATI (C)1986 Tandem (C)2003 Hewlett Packard Development Company, L.P.
Measure Command Interface (MEASCOM) Redirecting Command Output Redirecting Command Output You can redirect command output to save a Measure report, plot, or INFO command display in a file: • To redirect the output from one MEASCOM command, specify the OUT filename option immediately after the command, on the same line and before any arguments. For example: 4+ LIST /OUT $PERF.DATA.MYVOL/ CPU 1, FROM 12:30, TO 12:45 • To redirect the output of multiple MEASCOM commands, enter the OUT filename command.
Measure Command Interface (MEASCOM) Creating a Custom Startup File Creating a Custom Startup File You can create a file of MEASCOM commands to be executed similarly to a command (OBEY) file each time MEASCOM is invoked. The file must be an EDIT file named MEASCSTM that contains only MEASCOM commands. You can set up multiple MEASCSTM files to perform different measurements. Each MEASCSTM file must be in a different subvolume. MEASCOM first looks for the MEASCSTM file in the current subvolume.
Measure Command Interface (MEASCOM) Accessing Online Help process whose programfile was in $SYSTEM.SYSTEM to be measured. To view the measurement configuration for each entity type use the INFO entity command. Once the configuration is complete, a START MEASUREMENT command is executed. To view the results of the measurement the ADD MEASUREMENT command is used (the START and STOP MEASUREMENT commands perform an implicit ADD MEASUREMENT).
Accessing Online Help Measure Command Interface (MEASCOM) alphabetic, } { remaining characters can be digits, hyphens (-), } { underscores (_), or carets (^). } See HELP ADD for , except for SQLSTMT, see HELP LIST SQLSTMT. See HELP ADD PLOT for - . See HELP REPORT for ,
Accessing Online Help Measure Command Interface (MEASCOM) this, change the RATE attribute of the REPORT object. For example: SET REPORT RATE ON; LIST PLOT -- generates a plot with rated values SET REPORT RATE OFF; LIST PLOT -- generates a plot with unrated values • To view possible counter names for an entity type, type HELP, the entity type, and COUNTERS.
Measure Command Interface (MEASCOM) Modifying D-Series Command Files for Systems Running G-Series RVUs Modifying D-Series Command Files for Systems Running G-Series RVUs After you migrate from a D-series RVU to a G-series RVU, you might have to change your Measure command (OBEY) files. In command files written for D-series RVUs, you use channel, controller, and unit numbers to identify specific storage devices (DEVICE, DISC) and communication devices (LINE, NETLINE, TERMINAL).
Measure Command Interface (MEASCOM) Accessing D-Series Measurement Files From a System Running a G-Series RVU Measure User’s Guide —520560-003 2- 14
3 Configuring and Running Measurements Taking a measurement involves selecting the resources to be measured, creating a measurement configuration for those resources, and starting the measurement. While a measurement runs, you can check its status and display data in the measurement data file or in the active counters associated with the measurement configuration. After it stops, you can display or plot data from the measurement data file.
Configuring and Running Measurements Entity Types and Specifications Entity Types and Specifications The measurement configuration describes each resource to be measured in terms of its entity type and entity specification. This list describes each entity type: CLUSTER Measures the number of FOX messages sent and received by all processes on the local server. Currently supported only in D-series PVUs.
Configuring and Running Measurements Creating the Configuration TERMINAL Measures terminal and subdevice I/O. TMF Measures TMF transactions. USERDEF Measures activity in a user process that has been instrumented to maintain user-defined counters. An entity specification describes a particular resource within an entity type. For example, the specification for a CPU entity is a CPU number (0, 1, 2, and so on). The specification for a DISC entity is a disk name ($DATA, $INFO, $BUYER, and so on).
Configuring and Running Measurements Running a Measurement Running a Measurement 1. By default, MEASCOM starts a measurement immediately after you issue the START MEASUREMENT command and ends it when you enter the STOP MEASUREMENT command. However, you can specify starting and ending times for the measurement in the START MEASUREMENT command. 2.
Configuring and Running Measurements Starting a Measurement collects information about the amount of time the CPU was busy, the INTR-BUSY-TIME counter records the amount of time the CPU spent handling interrupts, the SWAPS counter records the number of pages the CPU swapped, and so on. Similarly, when you specify the DISC entity in a configuration, all predefined DISC counters are activated when the measurement starts.
Configuring and Running Measurements Starting a Measurement To start a measurement that collects data in the file named $PERF.DATA.NOV5: 16+ START MEASUREMENT $PERF.DATA.NOV5 Specifying a Start and Stop Time Use the TO, FROM, and FOR clauses of the START MEASUREMENT command to direct MEASCOM to start or stop the measurement at a specific time. The TO and FOR clauses cannot be used together. For detailed descriptions of the FROM, TO, and FOR clauses, see the Measure Reference Manual.
Configuring and Running Measurements Stopping a Measurement This command starts a measurement at 9:00 a.m., ends the measurement at 5:00 p.m., and specifies a 30-minute collection interval: 4+ START MEASUREMENT $PERF.DATA.NOV5, FROM 9:00, TO 17:00,& 4& INTERVAL 30 MINUTES Using a collection interval does not cause counters to be reset during a measurement. Counter values are always accumulated for the entire measurement. Use a collection interval only when you need a detailed view of system performance.
Configuring and Running Measurements Checking Measurement Activity and Data Files Checking Measurement Activity and Data Files To find out how many measurements are active on or configured for a system, use the STATUS MEASSUBSYS, STATUS MEASUREMENT, and INFO MEASUREMENT commands. Active includes not only measurements that are running, but also any measurements whose data files have filled up but that have not been stopped.
Configuring and Running Measurements Checking Data File Accessibility For an active measurement, this command shows the number of entities being measured, the space allocated to each, the current and maximum size of the data file, and the percentage of space used. For example: 30+ STATUS MEASUREMENT $DATA.PERF.
Configuring and Running Measurements Potential Data File Errors the current data file. To change the current data file, you must issue the ADD MEASUREMENT data-file-name command. For example, to make $DATA.PERF.JUL01A the current data file: 5+ ADD MEASUREMENT $DATA.PERF.JUL01A 6+ INFO MEASUREMENT * Add measurement $DATA.PERF.
Configuring and Running Measurements Viewing Reports of Measurement Data inactive, but MEASMON keeps the file open until you stop the measurement. To stop the measurement and close the file, enter the STOP MEASUREMENT command. If you issue a STATUS MEASSUBSYS command against an aborted measurement, the measurement is included in the list of active and configured measurements.
Viewing Reports From Data Files Configuring and Running Measurements When you access a data file associated with a currently active measurement, you might encounter a delay before counters appear because the MEASCTL processes buffer data before writing it to the file. Also, an active data file contains data primarily from transient entities unless you started the measurement with a collection interval.
Viewing Reports From Data Files Configuring and Running Measurements Memory MB 32 PCBs 483 Page Size 4096 Local System \SPAR From 10 Nov 2003, 15:48:29 for 3.6 Minutes Cpu-Busy-Time Cpu-Qtime Mem-Qtime Dispatches Process-Ovhd Disc-IOs Transactions Page-Requests Ending-Free-Mem Ending-UDS Ending-UCL Accel-Busy-Time TNSR-Busy-Time 23.81 % 0.26 # 126.83 0.77 4092 500 100 14.35 % 7.
Viewing Reports From Data Files Configuring and Running Measurements Opener 1,66 ($PRF1) Program $SYSTEM.SYSTEM.PERF File Num 11 Local System \HATI From 6 Dec 2003, 11:20:38 For 0.2 Seconds File-Busy-Time Reads Updates-or-Replies Records-Used Messages Lock-Waits Escalations 54.85 % Disc Reads 4.66 Writes 4.66 Deletes-or-Writereads Records-Accessed 18.62 Message-Bytes 2,830 Timeouts Info-Calls ++ File Open $SYSTEM.SYSTEM.FSEARCH Device Type 3 (Disk) Opener 1,76 ($ZTA) Program $SYSTEM.SYSTEM.
Viewing Reports From Data Files Configuring and Running Measurements You can control the content and format of reports by using the BY and IF options of the LIST command or by setting REPORT object attributes. For details and examples, see Section 4, Formatting Reports and Plots. MEASCOM automatically allocates an extended segment to hold retrieved counter records, increasing the segment size as needed up to 16 megabytes. MEASCOM displays a warning message each time it resizes the segment.
Viewing Reports From Active Counters Configuring and Running Measurements Disc-IOs Transactions Page-Requests Ending-Free-Mem Ending-UDS Ending-UCL 4092 500 100 Cache-Hits Response-Time Page-Scans Ending-UCME Ending-SDS Ending-SCL 1500 2000 Use an asterisk to select all specifications of an entity.
Viewing Reports From Active Counters Configuring and Running Measurements Identifying Active Measurements To list currently active measurements, enter the STATUS MEASSUBSYS command: 10+ STATUS MEASSUBSYS Number of Active (or Configured) Measurements = $PERF.DATA.FILCPU 1 To list the configuration of an active measurement, enter the ADD MEASUREMENT command to make the measurement available to MEASCOM and the INFO MEASUREMENT command to display the configuration: 11+ ADD MEASUREMENT $PERF.DATA.
Viewing Reports From Active Counters Configuring and Running Measurements 0 collected over a 5-minute period. The period begins when you enter the LISTACTIVE command. 24+ LISTACTIVE CPU Cpu 0 VLX Memory MB 16 Local System \HATI Cpu-Busy-Time Cpu-Qtime Mem-Qtime Dispatches Process-Ovhd Disc-IOs Transactions Page-Requests Ending-Free-Mem Ending-UDS Ending-UCL 0, FOR 5 MINUTES Initial Lock Pgs 2048 Mem Pages 8192 PCBs 256 Page Size 2048 From 6 Dec 2003, 11:25:11 For 5 Minutes 15.83 % 0.19 # 88.79 0.01 % 11.
4 Formatting Reports and Plots Measure provides two types of data displays: Display Type Display... Commands That Produce Them Reports Lists of counter values LIST entity-type, LISTALL entity-type, LISTACTIVE entity-type Plots Data values in graphs LIST PLOT You can also use MEASCOM to convert Measure data files, which are unstructured, to structured files.
REPORT Attributes Formatting Reports and Plots To display the current settings of REPORT attributes, use the SHOW REPORT command.
REPORT Attributes Formatting Reports and Plots Set Set Set Set Report Report Report Report From To For LoadId Table 4-1. MEASCOM REPORT Attributes (page 1 of 2) Attribute Description FORMAT Sets the basic format of reports: RATE TOTALS ZERO-VALUES ZERO-REPORTS NORMAL displays all counters (default). BRIEF displays a Measure-defined subset of counters. STRUCTURED writes data to structured files for use by report-writing products.
REPORT Attributes Formatting Reports and Plots Table 4-1. MEASCOM REPORT Attributes (page 2 of 2) Attribute Description DOTS Specifies whether displays include a string of dots between counter labels and a formatted numeric value (Measure G11 and later). ON adds dots to the report display. OFF formats spaces between labels and numeric values (default). LOADID loadid Specifies the name to be put in the LOADID field of the records generated by this command.
REPORT Attributes Formatting Reports and Plots Set Set Set Set Set Set Set Set Report Report Report Report Report Report Report Report Style ZMS Totals suppress Zero-Values suppress Zero-Reports suppress From To For LoadId Overriding REPORT Attributes To override REPORT attributes, specify them in the LIST entity-type, LISTALL entity-type, and LISTACTIVE entity-type commands. The values specified in these commands remain in effect only for the life of the command.
Controlling the Report Window Formatting Reports and Plots For PROCESSH entities, the object of the BY clause is a code-range name rather than a counter name. For DISC entities, the counter name for a cache counter must be preceded by C0-, C1-, C2-, or C3- to differentiate between the different cache block sizes. For example, to display all DISC records in descending order according to the value of the HITS counter for the 512-byte cache (C0): 7+ LIST DISC *, BY C0-HITS Note.
Controlling the Report Window Formatting Reports and Plots Example 4-1. Legacy Format Report (Listed Format) 9+ LIST CPU 1 Cpu 1 NSR-L Initial Lock Pgs 2048 Mem Pages 8192 Memory MB 32 PCBs 256 Page Size 4096 Local System \SPAR From 17 Aug 2003, 11:20:00 For 2 Hours Cpu-Busy-Time Cpu-Qtime Mem-Qtime Dispatches Process-Ovhd Disc-IOs Transactions Page-Requests Ending-Free-Mem Ending-UDS Ending-UCL Accel-Busy-Time TNSR-Busy-Time 48.19 1.07 0.11 155.31 0.16 1.70 % # # # % 4092 500 100 0.95 % 1.
Displaying Interpreted and Uninterpreted Values Formatting Reports and Plots Example 4-3. Setting a Report Window 11+ LIST CPU 1, FROM 11:30, TO 12:00 Cpu 1 NSR-L Initial Lock Pgs 2048 Mem Pages 8192 Memory MB 32 PCBs 256 Page Size 4096 Local System \SPAR From 17 Aug 2003, 11:30:00 For 30 Minutes Cpu-Busy-Time Cpu-Qtime Mem-Qtime Dispatches Process-Ovhd Disc-IOs Transactions Page-Requests Ending-Free-Mem Ending-UDS Ending-UCL Accel-Busy-Time TNSR-Busy-Time 38.73 1.01 0.13 111.27 0.
Formatting Reports and Plots Displaying Interpreted and Uninterpreted Values Example 4-4. Report of Uninterpreted Counter Values 44+ LIST CPU 1, RATE OFF Cpu 1 NSR-L Initial Lock Pgs 2048 Mem Pages 8192 Memory MB 32 PCBs 256 Page Size 4096 Local System \SPAR From 16 Aug 1996, 11:20:00 For 3 Minutes Cpu-Busy-Time Cpu-Qtime Mem-Qtime Dispatches Process-Ovhd Disc-IOs Transactions Page-Requests Ending-Free-Mem Ending-UDS Ending-UCL Accel-Busy-Time TNSR-Busy-Time 52.04 sec Swaps 56.
Plotting Measurement Data Formatting Reports and Plots Plotting Measurement Data Plots are used to compare counters graphically. You can plot data from an active or inactive measurement data file. You cannot plot data from active counter records or from multiple data files. MEASCOM provides two types of plots: two-axis plots and bar graphs. Both types of plots can be modified using PLOT attributes. A two-axis plot shows time on one axis and the counter value range on the other.
The Plot Definition Formatting Reports and Plots Variations on these basic plot formats are described and illustrated in this section. To plot data: 1. Define the plot using the LIST entity-type command followed by the ADD PLOT commands. 2. Set PLOT attributes. 3. Generate the plot using the LIST PLOT command. The Plot Definition A plot definition is a list of entity-counter pairs built by MEASCOM. The LIST entity-type command specifies the entities to plot.
The Plot Definition Formatting Reports and Plots Mem-Qtime Dispatches Process-Ovhd Disc-IoS Transactions Page-Requests Ending-Free-Mem Ending-UDS Ending-UCL 0.11 # 155.31 0.16 % 4092 500 100 Mem-Qlen-Max Intr-Busy-Time Send-Busy-Time Cache-Hits Response_Time Page-Scans Ending-UCME Ending-SDS Ending-SCL 13 # 4.73 % 0.
PLOT Attributes Formatting Reports and Plots When the plot definition is redisplayed, the counter for CPU 0, associated with plot character A, has been deleted: 9+ INFO PLOT * Add measurement $SPOOL.PERF.DATA1 --B-- List Cpu 1 Add plot CPU-BUSY-TIME --C-- List Cpu 2 Add plot CPU-BUSY-TIME . . . --L-- List Cpu 11 Add plot CPU-BUSY-TIME To delete all counters of the same type from a plot definition, use an asterisk in place of the plot character.
PLOT Attributes Formatting Reports and Plots Note. To select interpreted or uninterpreted counter values for plotting, you must set the REPORT RATE attribute. If REPORT RATE is ON, interpreted values are plotted when you issue the LIST PLOT command. If REPORT RATE is OFF, uninterpreted values are plotted when you issue the LIST PLOT command. For more information about the REPORT RATE attribute, see Displaying Interpreted and Uninterpreted Values on page 4-8. Table 4-2.
PLOT Attributes Formatting Reports and Plots Setting PLOT Attributes To set the PLOT attributes in MEASCOM, use the SET PLOT command. For example, to set the default VERT-BASE attribute to OFF: 7+ SET PLOT VERT-BASE OFF 8+ SHOW PLOT VERT-BASE Set Plot Vert-Base off The SHOW command displays the new setting. You can set several PLOT attributes in the same command.
Generating Plots Formatting Reports and Plots Generating Plots The LIST PLOT command in Example 4-5 generates a two-axis plot of CPU-BUSYTIME for 12 CPUs. The measurement ran from 11:20 a.m. to 1:20 p.m. A 30-minute interval was used to collect the data. The alphabetic (plot) characters on the plot correspond to the CPUs listed in the key below the plot. Each plot character represents the value of a CPU-BUSY-TIME counter at the time shown on the vertical axis. Example 4-5.
Generating Plots Formatting Reports and Plots Example 4-6. Two-Axis Plot Showing One-Hour Intervals 21+ LIST PLOT, INTERVAL 1 HOUR 0:::::+:::20.0:::::+:::40.0:::::+:::60.0:::::+:::80.0:::::+::::100 11:20:00 I A G E L K C B D 12:20:00 I H A GJ E B C K D 13:20:00 -H IEL A CG K D F B 0:::::+:::20.0:::::+:::40.0:::::+:::60.0:::::+:::80.0:::::+::::100 Min value = 2.152 Max value = 100.
Generating Plots Formatting Reports and Plots Example 4-7. Two-Axis Plot Converted to Bar Graph 26+ LIST PLOT, TIME-BASE OFF 0:::::+:::20.0:::::+:::40.0:::::+:::60.0:::::+:::80.0:::::+::::100 A ***********| B *********************************| C *******************************| D ******************************************| E *******************| F ***************| G ************| H *********| I *****| J *************| K ******************************| L *****************| 0:::::+:::20.0:::::+:::40.
Generating Plots Formatting Reports and Plots --D-- List Cpu 3 Add plot CPU-BUSY-TIME --E-- List Cpu 4 Add plot CPU-BUSY-TIME --F-- List Cpu 5 Add plot CPU-BUSY-TIME --G-- List Cpu 6 Add plot CPU-BUSY-TIME --H-- List Cpu 7 Add plot CPU-BUSY-TIME --I-- List Cpu 8 Add plot CPU-BUSY-TIME --J-- List Cpu 9 Add plot CPU-BUSY-TIME --K-- List Cpu 10 Add plot CPU-BUSY-TIME --L-- List Cpu 11 Add plot CPU-BUSY-TIME --M-- List File $SYSTEM.SYSTEM.DMON (9, 0, 4) Add plot FILE-BUSY-TIME --N-- List File $SYSTEM.SYSTEM.
Generating Plots Formatting Reports and Plots definition. The LIST FILE command orders the files by FILE-BUSY-TIME, from busiest to least busy. The ADD PLOT command adds the 14 busiest files to the plot definition: 16+ DELETE PLOT FILE-BUSY-TIME (*) 17+ LIST FILE *, BY FILE-BUSY-TIME . . (Display of all files from busiest to least busy appears here.) . . 18+ ADD PLOT FILE-BUSY-TIME MEAS 3008 WARNING.
Generating Plots Formatting Reports and Plots Add plot FILE-BUSY-TIME --U-- List File $SYSTEM.SYSTEM.XRLSTOOL (3, 166, 6) Add plot FILE-BUSY-TIME --V-- List File $SYSTEM.SYSTEM.USERID (2, 96, 6) Add plot FILE-BUSY-TIME --W-- List File $SYSTEM.SYSTEM.USERID (8, 84, 6) Add plot FILE-BUSY-TIME --X-- List File $SYSTEM.SYSTEM.USERID (7, 73, 6) Add plot FILE-BUSY-TIME --Y-- List File $SYSTEM.SYSTEM.USERID (11, 145, 2) Add plot FILE-BUSY-TIME --Z-- List File $SYSTEM.SYSTEM.
Changing the Scale Formatting Reports and Plots Changing the Scale Changing the scale of a graph can make its data more distinct and accessible. To change the scale on a two-axis plot or a bar graph, use the SCALE-FROM and SCALE-TO plot attributes of the SET PLOT or LIST PLOT command. The default scale is 0 to 100. To plot values larger than 100, you must change the scale default. The minimum and maximum data values shown in each plot appear following each graph.
Changing the Orientation Formatting Reports and Plots Changing the Orientation For a two-axis plot, changing the orientation means changing the time interval from the vertical axis (the default) to the horizontal axis. For a bar graph, changing the orientation means changing the base of the bars from the vertical axis, running horizontally (the default), to the horizontal axis, running vertically. Use the VERT-BASE attribute of the LIST PLOT or SET PLOT command to set the orientation for a plot.
Changing the Orientation Formatting Reports and Plots Example 4-11. Changing the Orientation of a Two-Axis Plot 56+ LIST PLOT, VERT-BASE ON-- Vertical Orientation (Default) 0:::::+:::20.0:::::+:::40.0:::::+:::60.0:::::+:::80.0::::+::::100 11:20:00 E D C B A 11:50:00 E C D A B 12:20:00 B C E A D 12:50:00 E BD A C 13:20:00 E C D A B 0:::::+:::20.0:::::+:::40.0:::::+:::60.0:::::+:::80.0::::+::::100 Min value = 5.838 Max value = 100.
Changing the Orientation Formatting Reports and Plots Example 4-12. Changing the Orientation of a Bar Graph 59+ LIST PLOT, VERT-BASE ON, TIME-BASE OFF-- Vertical Orientation 0:::::+:::20.0:::::+:::40.0:::::+:::60.0:::::+:::80.0:::::+::::100 A ******************************************| B *********************************| C *******************************| D ******************************| E *******************| 0:::::+:::20.0:::::+:::40.0:::::+:::60.0:::::+:::80.0:::::+::::100 Min value = 27.
Changing the Density Formatting Reports and Plots Changing the Density For a two-axis plot, setting the density means deciding whether to display one point for each plotted value at each time interval (the default) or to display asterisks between the time axis and the lowest value at each time interval. For a bar graph, setting the density means deciding whether to display narrow bars or wide bars. Narrow bars are one character wide (the default). Wide bars are two to six characters wide.
Changing the Plot Window Formatting Reports and Plots Example 4-14. Changing the Density of a Bar Graph 63+ LIST 100 95.0 90.0 85.0 80.0 75.0 70.0 65.0 60.0 55.0 50.0 45.0 40.0 35.0 30.0 25.0 20.0 15.0 10.0 5.00 0 PLOT, VERT-BASE OFF, TIME-BASE OFF, WIDE-ITEM ON ----------------------------------------- -----| | -| | -| |-----| | |----- -----| | | | | -| | | | | -| | | | |-----| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | | -| | | | | |--------A B C D E Min value = 27.
Plotting Execution Modes Formatting Reports and Plots Example 4-15. Five Busiest CPUs, One-Hour Time Window 73+ LIST PLOT, FROM 11:00, TO 12:00 0:::::+:::20.0:::::+:::40.0:::::+:::60.0:::::+:::80.0:::::+::::100 11:20:00 E D C B A 11:50:00 E C D A B 0:::::+:::20.0:::::+:::40.0:::::+:::60.0:::::+:::80.0:::::+::::100 Min value = 23.915 Max value = 74.
Plotting Execution Modes Formatting Reports and Plots Example 4-17. Typical PROCESSH Report Showing TNS/R Native Mode Process CPU 8 Pin 10 Local System \BANK Program $SYSTEM.SYS02.MEASCOM Priority 140 Userid 2,63 From 17 Aug 1996, 16:51:00 Total Samples for the process = Code-Map UCr Samples Creatorid 255,255 For 53.2 seconds 799 # 137 # Code-Range Name TNSR -------------------------- --------FORMAT 65 # PRINT^RESULTS 52 # FINDT 20 # 17.
Plotting Execution Modes Formatting Reports and Plots Example 4-18. Plotting Execution Modes—TNS and Accelerated Code Samples A B C D E F 0:::::+:::20.0:::::+:::40.0:::::+:::60.0:::::+:::80.0:::::+:::100 *************************++++++++++++++++++| ********************************++| *******************************************************++++++++++++++++++++++++| +| +++++++++++++++++++++++++++++++++++| 0:::::+:::20.0:::::+:::40.0:::::+:::60.0:::::+:::80.0:::::+:::100 MIN VALUE = 2.
Producing Structured Files of Measurement Data Formatting Reports and Plots Producing Structured Files of Measurement Data The Enform query product and the NonStop SQL/MP command interpreter (SQLCI) can access Measure data files only after they are converted to structured files and a data dictionary that describes the structure of the file is created. To format and write Measure data to structured data files and create a data dictionary using MEASCOM: 1.
Step 2: Load the Structured Files Formatting Reports and Plots Table 4-3. Command Option Effects on Data Written to Structured Files (page 2 of 2) Command Option Effect REPORT ZERO-VALUES No effect. Counter values of zero are always written to the structured file as zero. LIST/LISTALL FROM, TO, FOR clauses Determines which records are written to the structured file. LIST/LISTALL BY clause Sorts entities before data is written. The order of entities in the structured files does not matter.
Step 3: Build the Data Dictionary Formatting Reports and Plots 1. Build a command (OBEY) file containing the appropriate LIST entity-type or LISTALL entity-type commands. 2. Load the structured report files by executing the OBEY file from within MEASCOM. Measure appends new records to existing structured files. To purge existing files before writing out new values, issue this command or add it to your OBEY file: 42+ RUN FUP PURGE filename [, filename ] ...
Generating Reports Using Enform and SQL/MP Products Formatting Reports and Plots The DDL command creates a dictionary in your current subvolume and writes to an out file the records entered into it. The OUT option sends the list of records to the default printer. There should be 14 files on your subvolume, each beginning with DICT.
Formatting Reports and Plots Loading Data From Different Systems to Common Files systems run as the common format. Update to ZMS style only if your application or query is being updated to use new counter or identifier fields.
Formatting Reports and Plots Loading Data From Different Systems to Common Files Measure User’s Guide —520560-003 4- 36
5 Defining Custom Counters You can define custom counters to collect information about an application. Any counters you define are of the USERDEF entity type. To use these counters, you must first instrument the application to measure (that is, modify it so it bumps the counters).
Step 1: Source in the MEASDECS File Defining Custom Counters Step 1: Source in the MEASDECS File The MEASDECS file contains the literal values that are passed to the MEASCOUNTERBUMP procedure. MEASDECS is located on $SYSTEM.SYSnn, where SYSnn is the subvolume that contains the OSIMAGE file. Step 2: Declare Integer Variable, Array, and Offset Declare the following: error An integer variable that holds the function values returned by the MEASCOUNTERBUMPINIT and MEASCOUNTERBUMP procedures.
Sample TAL Program Defining Custom Counters When specifying bumptype: • • • If you specify ADD, specify the value to add to the counter as the third parameter. If you specify SETBUSY, you must have a matching RESETBUSY call. If you specify INCQUEUE, you must have a matching DECQUEUE call. Caution. Not balancing the busy and queue calls causes unpredictable counter values. If you are using an array of counters, specify the index value of the counter as the fourth parameter.
Sample TAL Program Defining Custom Counters Example 5-1. TAL Application Containing User-Defined Counters (page 2 of 3) ?SOURCE $SYSTEM.SYSTEM.EXTDECS (MYTERM, OPEN, DEBUG, WRITE, ? NUMOUT, DELAY, CLOSE, MEASCOUNTERBUMP, ? MEASCOUNTERBUMPINIT) ?LIST ?PAGE "MAIN PROCEDURE -- BILLING" PROC billing MAIN; BEGIN ! counter names and offsets int .transactions[0:7] := ["TRANSACTIONS int .timeper[0:7] := ["TIMEPER "]; int .
Sample TAL Program Defining Custom Counters Example 5-1.
Task 2: Measure the Application Defining Custom Counters Task 2: Measure the Application Before starting a measurement, you must first create a measurement configuration that names the application to measure and the user-defined counters within the application to use. Each record written to the measurement data file contains information about a process that is running the application and the values of the user-defined counters bumped by that application.
Considerations Defining Custom Counters type is a counter type: ACCUM, BUSY, or QUEUE. The type depends on the bump action the application uses to bump the counter. Specify type in the ADD COUNTER command to allocate the proper amount of space for the counter. If the application treats the specified user-defined counter as an array of counters, specify n as the number of counters associated with the counter name.
Considerations Defining Custom Counters executing process and the values of the user-defined counters bumped by the application. • These reports were generated by measuring the execution of the application in Example 5-1 on page 5-3. The application bumps each type of user-defined counter. The first report is displayed with the RATE ON report attribute, the second with the RATE OFF report attribute. 13+ LIST USERDEF * Process Program $WORK.APPL.
Sample COBOL Application Defining Custom Counters Sample COBOL Application To modify a COBOL program to establish a programmatic interface to the Measure subsystem and update user-defined counters: 1. Create a TAL procedure named MEAS^BUMP by compiling the sample TAL routine shown in Example 5-2. 2. Place the object in a user-named file (measlib). Example 5-2. TAL Source of the MEAS^BUMP Procedure ?SYMBOLS,INSPECT ?NOMAP, NOLMAP, NOCODE INT ERROR :=0; ?SOURCE $SYSTEM.SYSTEM.
Sample COBOL Application Defining Custom Counters The MEAS-NUMS section of the program contains the code to initialize and modify the counters; for example: ENTER TAL "MEAS^BUMP" USING WS-id-NAME,action,count,index GIVING MEAS-ERROR where: action is an item from WS-MEASURE-LITS. count is WS-id-COUNT (required only if action is MEAS-ADD). index is a numeric value or WORKING-STORAGE entry that contains the index value for an array of counters.
Sample COBOL Application Defining Custom Counters Example 5-3. COBOL Application Containing User-Defined Counters (page 2 of 6) FILE-CONTROL. SELECT MESSAGE-FILE ASSIGN TO $RECEIVE. SELECT REPLY-FILE ASSIGN TO $RECEIVE. SELECT PIN-FILE ASSIGN TO PINFILE ORGANIZATION IS RELATIVE ACCESS MODE IS RANDOM RELATIVE KEY IS REL-KEY ALTERNATE RECORD KEY IS CUST-NO-A ALTERNATE RECORD KEY IS PIN-NO WITH DUPLICATES FILE STATUS IS FILE-STATUS. RECEIVE-CONTROL. TABLE OCCURS 10 TIMES REPLY CONTAINS REPLY-FILE RECORD.
Sample COBOL Application Defining Custom Counters Example 5-3. COBOL Application Containing User-Defined Counters (page 3 of 6) 01 * * * * * * * * * * * * * * WS-MEASURE-LITS. 03 MEAS-INC 03 MEAS-ADD 03 MEAS-SETBUSY 03 MEAS-RESETBUSY 03 MEAS-INCQUEUE 03 MEAS-DECQUEUE 03 MEAS-ERROR PIC PIC PIC PIC PIC PIC PIC 9 VALUE 9 VALUE 9 VALUE 9 VALUE 9 VALUE 9 VALUE 9(4). 1. 2. 3. 4. 5. 6. WS-MEASURE-LITS - are numeric literals that signify the action required from MEAS^BUMP.
Sample COBOL Application Defining Custom Counters Example 5-3. COBOL Application Containing User-Defined Counters (page 4 of 6) A-00-ERROR. MOVE 1 TO fstat-1. END DECLARATIVES. MAIN-PROC SECTION. * * B-00. PERFORM OPENERS. PERFORM READ-MESSAGE PERFORM CLOSERS. B-99. UNTIL JOB-STATE = "T". * STOP RUN. / * OPENERS SECTION. * C-00. OPEN INPUT MESSAGE-FILE. OPEN OUTPUT REPLY-FILE. OPEN INPUT PIN-FILE SHARED. C-99. EXIT. / * READ-MESSAGE SECTION. D-00. READ MESSAGE-FILE AT END MOVE "T" TO JOB-STATE.
Sample COBOL Application Defining Custom Counters Example 5-3. COBOL Application Containing User-Defined Counters (page 5 of 6) IF fstat-1 NOT = 0 I.E. RECORD NOT FOUND MOVE "*** CUSTOMER NOT FOUND ON FILE TO REPLY-MSG OF SEC-NAR-REPLY MOVE 0 TO REPLY-CODE OF SEC-NAR-REPLY WRITE SEC-NAR-REPLY PERFORM MEAS-INCUST GO TO F-99. I.E.
Sample COBOL Application Defining Custom Counters Example 5-3. COBOL Application Containing User-Defined Counters (page 6 of 6) MEAS-INP. user-created counter for INVALID PASSWORD * ENTER TAL "MEAS^BUMP" USING WS-COUNTS-NAME, MEAS-INC,, 1 GIVING MEAS-ERROR. MEAS-SUC. user-created counter for SUCCESSFUL PASSWORD * ENTER TAL "MEAS^BUMP" USING WS-COUNTS-NAME, MEAS-INC,, 2 GIVING MEAS-ERROR. MEAS-CNT.
Sample COBOL Application Defining Custom Counters Measure User’s Guide —520560-003 5- 16
6 Creating a Custom Measurement Application You can write application programs that control the Measure subsystem and access measurement data. Your application must pass calls to the Measure procedures, which provide a programmatic equivalent of the MEASCOM command functions.
Preparing Your Program and Defining the Configuration Creating a Custom Measurement Application Table 6-1. Measure Callable Procedures (page 1 of 2) Procedure Function MEAS_ADJUSTZMSRECORD_ Adjusts ZMS-style structure records to the MEASDDLS format with which an application was compiled. MEAS_CODERANGENAME_DEM ANGLE_ Supports demangling of procedure (code-range) names. MEASCLOSE Terminates access to a data file. MEASCONFIGURE Defines the entities to be measured.
Reading Declaration Files Creating a Custom Measurement Application Table 6-1. Measure Callable Procedures (page 2 of 2) Procedure Function MEAS_READACTIVE_ Reads data from active counter records, for buffers larger than 32KB. MEASREADCONF Returns measurement configuration and resource use information from a data file. Requires that the file be opened (using MEASOPEN). MEASREAD_DIFF_ Returns counter records from a measurement data file.
Defining Entities Creating a Custom Measurement Application Before you call the first procedure that uses the control block, you must initialize each element in the block to -1: MEASCB.FIRSTWORD ':=' -1 & MEASCB.FIRSTWORD FOR (($LEN(MEASCB)>>1) - 1); The control block is used to store data for procedure calls. Do not modify the contents of the block for subsequent Measure procedure calls. Defining Entities The entity descriptors define what is to be measured.
Defining Entities Creating a Custom Measurement Application Table 6-2.
Creating a Custom Measurement Application Preparing the Configuration Table Preparing the Configuration Table The configuration table defines which entities are in a measurement. You pass the configuration table to MEASCONFIGURE before you start a measurement. After a measurement is configured, you can read its configuration table by calling MEASREADCONF or MEASINFO.
Creating a Custom Measurement Application Starting and Stopping the Measure Subsystem entity to the configuration table, and set the type field to a negative value. You can specify a negative value for the type string literal or the numeric identifier. For example, to measure all CPUs except CPU 6: 1. Add a CPU specification in which type is set to CPU^T and cpu^number is set to ALL. 2.
Creating a Custom Measurement Application Starting and Stopping the Measure Subsystem Example 6-1. Starting and Stopping the Subsystem DEFINE WLEN(S) = $LEN(S)>>1#; LITERAL STOP^SUBSYS = 0, START^SUBSYS = -1, MAX^NUM^MEASUREMENTS = 64; ! Structures for the Measure control block and for the ! array of measurement names returned by MEASMONSTATUS. STRUCT .MEASCB(MEASCB^DEF); STRUCT .MEASNAMES[0:MAX^NUM^MEASUREMENTS-1]; BEGIN INT FNAME[0:11]; END; INT MEASUREMENTS, ERROR; . . .
Creating a Custom Measurement Application Starting and Stopping a Measurement Starting and Stopping a Measurement To start a measurement: 1. Call MEASOPEN and pass it the data file plus a nonzero write parameter. 2. Call MEASCONFIGURE and pass it the data file number returned by MEASOPEN plus the location of the configuration table. 3. Call MEASCONTROL and pass it the measurement number returned by MEASCONFIGURE plus a specific start time and (optionally) a stop time. 4.
Creating a Custom Measurement Application Step 3: Call MEASCONTROL Step 3: Call MEASCONTROL You must call MEASCONTROL and pass it the measurement number returned by MEASCONFIGURE and a specific start time in the starttime parameter. You can also specify a stop time for the measurement in the first or a subsequent call to MEASCONTROL. Specify the current time so that the measurement starts immediately.
Step 4: Call MEASCLOSE (Optional) Creating a Custom Measurement Application Example 6-2. Starting and Stopping a Measurement (page 1 of 2) STRUCT BEGIN STRUCT STRUCT STRUCT END; .CONTAB; ! structure for configuration table STRUCT .MEASCB(MEASCB^DEF); INT DFNAME[0:11] DFNUM, ! SWAPVOL[0:3] MEASNUM, ! ERROR; HEADER(CONTAB^HDR); CPU(CPU^DESC)[0:1]; TRAILER(CONTAB^TRAILER); := ["$SYSTEM MEASURE CPUDATA "], returned by MEASOPEN := ["$SWAP "], returned by MEASCONFIGURE . . .
Creating a Custom Measurement Application Step 4: Call MEASCLOSE (Optional) Example 6-2. Starting and Stopping a Measurement (page 2 of 2) ! Initialize the trailer record. CONTAB.TRAILER.TYPE := CONTAB^TRAILER^T; CONTAB.TRAILER.LEN := $LEN(CONTAB.TRAILER); ! ! ! ! ! ! Start the measurement. First open the data file with MEASOPEN: request both read and write access and specify an alternate volume for MEASFH swap files. Next, call MEASCONFIGURE to pass CONTAB.
Creating a Custom Measurement Application Reading Counter Records Reading Counter Records To read counter records, use any of these procedures: Procedure Returns... MEASREAD Counter records built from counter values in the data file MEASREAD_DIFF_ Counter records built from counter values in the data file MEASREADACTIVE Counter records built from active counter values Note.
Creating a Custom Measurement Application • Reading Counter Records From a Data File The Measure Reference Manual shows the counter record format for each entity type using DDL RECORD statements. To create a source file containing TAL template structures for each record, use this DDL command: DDL /IN MEASDDLS/TAL filename, TALBOUND 0 where MEASDDLS is the DDL source file provided with Measure and filename is the TAL output file. • The first field in a counter record is an error field.
Creating a Custom Measurement Application Reading Counter Records From a Data File By default, both MEASREAD and MEASREAD_DIFF_ return the most recent record for an entity. This record is written at measurement, at entity stop time, or at the last collection interval. Both procedures have optional parameters you can use to specify a target time for records: • With the MEASREAD procedure, the nomtime parameter specifies a target time.
Creating a Custom Measurement Application Reading Counter Records From a Data File Example 6-3. Reading Records From a Data File (page 1 of 2) DEFINE LITERAL RECORD^LENGTH = $DBL($LEN(DISC^DEF))#; TRUE = -1, FALSE = 0; INT .EXT RECORD^BUF[0:32767], ! space in extended segment .EXT READ^PTR, ! buffer pointer .
Creating a Custom Measurement Application Reading Active Counters Example 6-3. Reading Records From a Data File (page 2 of 2) DO BEGIN SPACE^AVAILABLE := SPACE^AVAILABLE - $DBL(BYTESRET); IF SPACE^AVAILABLE < RECORD^LENGTH THEN ... ! not enough space for one record IF SPACE^AVAILABLE > 32000D THEN BUFSIZE := 32000 ELSE BUFSIZE := $INT(SPACE^AVAILABLE); IF ERROR := MEASREAD(DFNUM,DESCRIPTOR,READ^PTR, BUFSIZE,BYTESRET,FIRSTCALL) THEN ... ! handle error IF NOT BYTESRET THEN ...
Creating a Custom Measurement Application • ° The opener^cpu, opener^pin, and file^number fields in the FILE descriptor ° ° The cpu^number and pin fields in the PROCESS and USERDEF descriptors The lh^cpu and system^number fields in the SYSTEM and CLUSTER descriptors For systems running D-series RVUs: ° • Reading Active Counters The cpu^number, channel-num, ctrl, and unit fields in the CONTROLLER, DISC, DEVICE, LINE, NETLINE, and TERMINAL descriptors For systems running G-series RVUs: ° The cpu^
Creating a Custom Measurement Application Checking the Status of the Subsystem or a Measurement structures based on the template structure CPU^DEF (not shown), which defines a CPU counter record. Example 6-4. Reading Active Counters LITERAL MAX^CPU = 15; STRUCT STRUCT .CPU(CPU^DEF)[0:MAX^CPU]; ! counter record buffer .DESCRIPTOR(CPU^DESC); ! CPU descriptor INT BYTESRET, ERROR[0:MAX^CPU], I; . . . ! Initialize first two words of CPU descriptor. DESCRIPTOR.TYPE := CPU^T; DESCRIPTOR.LEN := $LEN(CPU.
Creating a Custom Measurement Application Checking the Status of the Subsystem or a Measurement The MEASSTATUS procedure call returns this information about an active measurement: • • • • The CPUs being measured. If any entity is being measured in a CPU and a MEASCTL process is running in that CPU, the bit corresponding to the CPU number is set in the parameter of the returned CPU. The measurement start, stop, and interval times.
Creating a Custom Measurement Application Reading the Measurement Configuration Example 6-5. Using MEASMONSTATUS and MEASSTATUS (page 2 of 2) IF ERROR := MEASMONSTATUS(MEASCB,MEASUREMENTS,MEASNAMES) THEN ... ! handle error IF NOT MEASUREMENTS THEN ... ! no active measurements; otherwise continue MEASNUM := 0; WHILE (MEASNUM < MAX^NUM^MEASUREMENTS) AND (MEASNAMES[MEASNUM].FNAME[8] <> "CPU0DATA") DO MEASNUM := MEASNUM + 1; IF MEASNUM >= MAX^NUM^MEASUREMENTS THEN ...
Creating a Custom Measurement Application Reading the Measurement Configuration Example 6-6. Restarting a Measurement (page 1 of 2) LITERAL BUFSIZE = 32000, TRUE = -1, FALSE = 0, MAX^NUM^MEASUREMENTS = 64; STRUCT BEGIN INT END; .MEASNAMES[0:MAX^NUM^MEASUREMENTS-1]; INT CONTAB[0:15999], !use space in extended segment MEASUREMENTS, MEASNUM, FILENAME[0:11] := ["$SYSTEM MEASURE CPUDATA "], DFNUM, BYTESRET; .EXT FNAME[0:11]; FIXED STARTTIME, STOPTIME, INTERVAL; INT(32) .ENTITIES[0:MAX^T], .
Creating a Custom Measurement Application Modifying D-Series Applications for G-Series Systems Example 6-6. Restarting a Measurement (page 2 of 2) IF ERROR := MEASOPEN(FILENAME,DFNUM,FALSE,TRUE) THEN ... ! handle error IF ERROR := MEASREADCONF(DFNUM,CONTAB,BUFSIZE,BYTESRET, STARTTIME,STOPTIME,INTERVAL, ENTITIES,CTRSPACE) THEN ... ! handle error IF ERROR := MEASCLOSE(DFNUM) THEN ... ! handle error Now start measurement. Reopen the data file, specifying ! both read and write access.
Creating a Custom Measurement Application Modifying D-Series Applications for G-Series Systems The CTRL^DESC descriptor, which is used in D-series PVUs to identify CONTROLLER entities, does not exist in G-series PVUs. It is replaced by the SVNET^DESC descriptor, which identifies ServerNet addressable controllers (SACs). However, you need not modify applications that include the CTRL^DESC descriptor if the descriptor specifies all controllers or specifies only a CPU number.
7 Balancing and Tuning a System Tuning a system lets you take full advantage of its capabilities to provide optimum performance to all users. This requires detailed knowledge of the system with which you are working: its hardware, applications, daily use, peak use, and so on. The first step in system tuning often is balancing the system.
Balancing a System Balancing and Tuning a System Balancing a System Balancing a system starts when you configure the system hardware. You should distribute disks, terminals, and other devices evenly across all CPUs. Balancing lets you distribute the primary I/O processes for those devices (especially disk processes) across all CPUs. The eventual goal is to distribute workload, so consider which I/O processes carry the heaviest loads and try to keep them on different CPUs.
Tuning a System Balancing and Tuning a System Tuning a System Because tuning a system can easily create as many problems as it solves, start tuning activities only if system users are not satisfied with system performance. When you are notified of a performance problem, the measurement data file from the ongoing system measurement gives you an excellent starting point for investigating the problem. Figure 7-1 on page 7-4 shows typical steps used to tune a NonStop system.
Tuning a System Balancing and Tuning a System Figure 7-1.
Balancing and Tuning a System Learning About the System and Its Applications Learning About the System and Its Applications You must know your system so you can understand its limitations. You must learn about each major application to determine how easily you can distribute its workload.
Learning About the System and Its Applications Balancing and Tuning a System Figure 7-2. Sample System Diagram: D-Series RVU IPB to Other Processors X Y X CPU 0 Y CPU 1 DISKA Disc Controller $SYSTEM-P $SYSTEM-M $DATA-P $DATA-M DISKB Disc Controller TAPEA Tape Controller $TAPE NETA Comm Controller $SNA1 $SNA2 VST003.
Learning About the System and Its Applications Balancing and Tuning a System Figure 7-3. Sample System Diagram: G-Series RVU Processor X Y Processor X Y X Y CCSA TRSA FESA E3S5A $NET1 $NET2 $SYSTEM-M $AUDIT-P $TAPE $DATA-P SCSI SACs SCSI SACs Disks PMF CRU $TAPE2 $DATA-M $SYSTEM-P PMF CRU $AUDIT-M VST005.vsd You should also develop a diagram of each major application running on the system.
Learning About the System and Its Applications Balancing and Tuning a System Figure 7-4. Sample Application Diagram Terminal Process Server (Formatter) Requester Line Handler Terminal Process Terminal Process Terminal Process Order Detail File Customer File Server (Formatter) Order Detail File Requester Terminal Process Line Handler Terminal Process Terminal Process Terminal Process VST004.vsd These attributes make an application easier to tune.
Correcting Outstanding Problems Balancing and Tuning a System server processes, you lose any chance of parallel processing and create an unmanageable sequence of queues. • Transient activity (process creations and deletions, and file opens and closes) is kept to a minimum. If an application has few of these attributes, it is difficult to spread its workload across the system. You might have to balance the system around the application.
Checking and Tuning Problem Areas Balancing and Tuning a System Checking and Tuning Problem Areas This subsection explains how to check and tune or balance common problem areas found in the system. When attempting to tune a system, start with the highest-level or most global external change. If the system problem is not resolved, progress to more complex or lower-level tuning tasks. This strategy is, in order of priority: 1. Balance memory consumption and minimize swapping. 2. Balance disk activity. 3.
Checking and Tuning Problem Areas Balancing and Tuning a System On systems running G-series RVUs, a disk can handle approximately 40 to 70 I/Os per second and can tolerate a somewhat higher swap rate. However, you should still try to reduce unnecessary swapping. Note. Code page faults require only one disk I/O. Also, data pages do not need to be rewritten unless they have been altered. For these reasons, the swapping formula might give a high estimate of swapping cost in terms of disk I/Os.
Checking and Tuning Problem Areas Balancing and Tuning a System To balance the memory requirements across CPUs, you first need to examine the memory requirements in each CPU. To do this, list the CPUs in order of their SWAPS counter values: 10+ LIST CPU *, BY SWAPS Do not accept a high SWAPS value as indicating memory problems without checking for short-term processes (see item 5 on page 7-11).
Checking and Tuning Problem Areas Balancing and Tuning a System Too many index levels in a key-sequenced file, poorly written applications, and the wrong cache size for disk processes all generate unnecessary disk I/Os. Use FUP to check and correct the index levels in key-sequenced files. For more information, see Checking I/O Activity. Note. On newer disk controllers, the SEEK-BUSY-TIME will be zero. Seek times are not provided.
Checking and Tuning Problem Areas Balancing and Tuning a System I/Os) and compare the result against the REQUESTS counter (logical I/Os). Averaging more than two physical I/Os per logical I/O indicates a possible performance problem. The main causes of unnecessary physical I/O operations can be divided into two classes: file structure (or access method) and cache configuration. Structuring a File Each index level in a key-sequenced file can cause an additional physical I/O operation.
Checking and Tuning Problem Areas Balancing and Tuning a System Using Cache A read or write operation to memory is much faster than a read or write operation to disk. The objective of disk cache is to keep frequently accessed information in memory, saving the time otherwise spent performing physical disk I/O. Read and buffered write operations can use cache. Unbuffered write operations always cause a disk I/O.
Checking and Tuning Problem Areas Balancing and Tuning a System ° Small files. By providing enough cache to hold the entire file, you can avoid many disk I/Os and so improve performance. Providing cache does not guarantee that the file remains in cache. Unless the small file is busy, its blocks are likely to be swapped out in favor of busier files. Use the STATISTICS and DETAIL clauses of the FUP INFO command to examine the block sizes and index levels of the major files on each disk.
Checking and Tuning Problem Areas Balancing and Tuning a System ° Backup disk processes might be consuming amounts of cache larger than their primary memory (TMF and control points). Depending on the cause of the cache faults, you might choose to reduce the amount of cache configured for the disk, reduce the amount of cache configured in the CPU, move processes out of the CPU, or reconfigure system processes. • • BLKS (blocks allocated).
Checking and Tuning Problem Areas Balancing and Tuning a System Balancing Disk Queues Disk queues indicate the amount of time an I/O request spent waiting within the disk subsystem. Because a CPU frequently waits for an I/O operation, disk queues can cause major performance problems. By balancing the disk queues across all disks, the average I/O request wait time becomes as short as possible.
Checking and Tuning Problem Areas Balancing and Tuning a System Continue until the disk queues are balanced, but move only one file at a time. After moving a file, check the effect of the change. If you have shifted the problem from one disk to another, either move the file back and try a different file or try moving the file to a different disk. Balancing CPU Activity You can consider CPU activity balanced when all CPUs have approximately the same CPU-QTIME in the LIST CPU command display.
Checking and Tuning Problem Areas Balancing and Tuning a System Continue the move until the CPU activity at each priority level is balanced across all CPUs (or is as balanced as it can be given your workload). Move one process at a time. After moving a process, check the effect of the change. If you shifted the problem from one CPU to the other, move the process back and try a different process. The priorities assigned to various types of processes can also affect performance.
Checking and Tuning Problem Areas Balancing and Tuning a System Response time should improve as the system is balanced. Do not treat response time subjectively. A system can seem faster or slower depending on how much needs to be accomplished.
Checking and Tuning Problem Areas Balancing and Tuning a System Measure User’s Guide —520560-003 7- 22
A Creating an Enform Report From Measure Data You can use Enform queries to create customized performance reports from Measure data. The Enform product can access Measure data files after they are converted to structured files and a data dictionary is created. For this procedure, see Producing Structured Files of Measurement Data on page 4-31.
Queue Lengths Creating an Enform Report From Measure Data This Enform session displays the PROCESS CPU-BUSY-TIME counter in microseconds in the column CPU-BUSY-TIME and as a percent busy value in the column PERCENT BUSY: >OPEN PROCESS; >LIST PROGRAM-FILE-NAME, CPU-BUSY-TIME, >((CPU-BUSY-TIME*100.
Rates Creating an Enform Report From Measure Data Rates The uninterpreted values provided by the structured report for incrementing and accumulating counters are the number of operations performed. To calculate operations per second, use this formula: (counter * 1.000) / (delta-time/1000000) You must divide by one million to get seconds because the length of the report window, DELTA-TIME, is in microseconds.
Creating an Enform Report From Measure Data Creating User-Defined Records The AS clause defines the PROC-TIME display format as F9.3. That is, PROC-TIME values are displayed in the format “nnnnn.nnn” (9 character places including the decimal, with 3 digits to the right of the decimal).
Creating User-Defined Records Creating an Enform Report From Measure Data 1. Decide on the field names and definitions. For example: proc-time := ((SUM(cpu-busy-time OVER cpu-num))/1000000) sys-time := ((SUM(cpu-busy-time OVER cpu-num WHERE program-file-name CONTAINS "OSIMAGE"))/1000000) disc-time := ((SUM(cpu-busy-time OVER cpu-num WHERE priority >= 220))/1000000) user-time := (proc-time - sys-time) CPU-BUSY-TIME and CPU-NUM are fields in the existing PROCESS record. 2.
Creating an Enform Report From Measure Data Creating User-Defined Records > CONTAINS "OSIMAGE"))/1000000), >disc-time := ((SUM(cpu-busy-time > OVER process.cpu-num WHERE > priority >= 220))/1000000), >user-time := ( ((SUM(cpu-busy-time OVER > process.cpu-num))/1000000) > -((SUM(cpu-busy-time OVER > process.cpu-num WHERE program-file-name > CONTAINS "OSIMAGE"))/1000000) ) >); The FIND statement begins by naming the new record to receive the values listed in the statement.
Creating an Enform Report From Measure Data Creating an Enform Report Creating an Enform Report To create an Enform report from Measure data: 1. Use DDL to add the required RECORD statements to the DDL dictionary. 2. If you use key-sequenced or alternate-key files, create a FUP schema file. Alternate-key files improve Enform performance when you sort the measurement data by field. a. Use the ?FUP command of DDL to create the schema file. b.
Creating an Enform Report From Measure Data NEWSUBVL—Establishing the Subvolume The first line of NEWSUBVL creates a new DDL dictionary using the RECORD statements in $SYSTEM.SYSnn.MEASDDLS. Examine NEWSUBVL to ensure that the specified SYSnn subvolume is correct for your system. If not, edit NEWSUBVL and correct it. Many of the commands in NEWSUBVL assume that the current subvolume contains certain required files. The remaining steps in this list create these files. 2.
Creating an Enform Report From Measure Data NEWSUBVL—Establishing the Subvolume 6. Execute NEWSUBVL: 44> OBEY NEWSUBVL Example A-1. DDLXCHNG File for Enform Reporting (page 1 of 3) ?FUP FUPXCHNG! ?SECTION unproc RECORD unproc.
Creating an Enform Report From Measure Data NEWSUBVL—Establishing the Subvolume Example A-1. DDLXCHNG File for Enform Reporting (page 2 of 3) ?SECTION procrep RECORD procrep. 02 02 02 02 02 loadid from-timestamp to-timestamp delta-time system-name 02 pid.
NEWSUBVL—Establishing the Subvolume Creating an Enform Report From Measure Data Example A-1.
Creating an Enform Report From Measure Data NEWSUBVL—Establishing the Subvolume Example A-2.
Creating an Enform Report From Measure Data NEWSUBVL—Establishing the Subvolume Example A-4. FINDPROC Query for Enform Reporting ?DICTIONARY OPEN process; OPEN cpu; OPEN unproc; LINK process TO cpu VIA cpu-num; FIND UNIQUE unproc ( process.loadid, process.from-timestamp, process.to-timestamp, process.delta-time, process.system-name, process.cpu-num, process.pin, process.process-name, process.program-file-name, process.priority, cpu-busy := ((process.cpu-busy-time * 100) / process.
NEWSUBVL—Establishing the Subvolume Creating an Enform Report From Measure Data Example A-5. QDPROC Query for Enform Reporting (page 1 of 3) !=============== Measure analysis by process-group ?DICTIONARY SET @DATE-FORMAT TO "M2-D2-Y2" SET @WIDTH TO 132; SET @LINES TO 54; DECLARE TEST-DATE SERVICE-TIME CPU-TIME AR-TIME AB-TIME DLTA-FACT AS DATE INTERNAL INTERNAL INTERNAL INTERNAL INTERNAL * F19.3 F19.3 F19.3 F19.3 F19.3 OPEN PROCREP; OPEN BASEREP; LINK BASEREP.B-LOADID TO PROCREP.
Creating an Enform Report From Measure Data NEWSUBVL—Establishing the Subvolume Example A-5. QDPROC Query for Enform Reporting (page 2 of 3) PRIORITY AS I3 HEADING "PRI" SERVICE-TIME := (IF RECV-RATE <= 0 THEN 100000.0 ELSE ((ATIME-READY * DISP-RATE) / RECV-RATE)) NOPRINT (IF SERVICE-TIME > 9999.8 THEN " " ELSE ((CPU-BUSY / RECV-RATE) * 10.)) AS F6.1 HEADING "CPU/COST/REQ" (IF SERVICE-TIME > 9999.8 THEN " " ELSE SERVICE-TIME) AS F6.1 HEADING "SERV/TIME/REQ" (IF SERVICE-TIME > 9999.
Creating an Enform Report From Measure Data STARTENF—Creating the Report Example A-5. QDPROC Query for Enform Reporting (page 3 of 3) AVG ((PROCREP.DELTA-TIME / 1000000) OVER PROGRAM-FILE-NAME.NAME) AS I4 HEADING "AVG/PROC/LIFE" WHERE PROCREP.CPU-BUSY > 1 OR NOT PROGRAM-FILE-NAME.NAME = "OSIMAGE" OR NOT PROGRAM-FILE-NAME.SUB-VOL BEGINS WITH "SYS" AND ATIME-BUSY > 0 OR PROCREP.
Creating an Enform Report From Measure Data STARTENF—Creating the Report 1. Type in (or copy) STARTENF. Many commands in STARTENF assume that the current subvolume contains certain required files. The remaining steps in this list create these files. STARTENF: FUP /IN FUPPURG/ ENFORM /in ENFFBASE/ FUP /IN LOADBASE/ TACL /IN PRNTPROC, OUT $S.#ENFOUT/ 2. Type in (or copy) FUPPURG.
Creating an Enform Report From Measure Data STARTENF—Creating the Report command to execute the QDPROC query, which creates the report. (The SET @STATS ON command generates Enform performance statistics.) PRNTPROC: CLEAR ALL PARAM ENFORM/IN ENFQPROC/ ENFQPROC: SET @STATS ON ?EXECUTE QDPROC 6.
B Examples of RECORD Statements and FIND Queries This appendix contains examples of Data Definition Language (DDL) RECORD statements and Enform FIND queries for the CPU and PROCESS entities. The FIND queries and RECORD statements can be used to create new fields for uninterpreted counter values. This appendix also contains examples of DDL RECORD statements that can be used to create alternate-key files for these new fields. Example B-1.
Examples of RECORD Statements and FIND Queries Example B-1. DDL RECORD Statement for Unstructured CPU File (page 2 of 2) 02 End-SDS 02 Start UCL 02 End-UCL 02 Start-SCL 02 End-SCL end TYPE TYPE TYPE TYPE TYPE binary binary binary binary binary 32 32 32 32 32 unsigned. unsigned. unsigned. unsigned. unsigned. Example B-2. Enform FIND Query for Unstructured CPU File ?DICTIONARY OPEN cpu, uncpu; FIND UNIQUE uncpu ( cpu.loadid, ascd cpu.cpu-num, cpu.from-timestamp, cpu.to-timestamp, cpu.
Examples of RECORD Statements and FIND Queries Example B-3. DDL RECORD Statement for Entry-Sequenced CPU File (page 1 of 2) ?FUP CPUFUP RECORD cpurep. FILE IS cpurep ENTRY-SEQUENCED. 02 loadid TYPE character 8 HEADING "LOAD/ID". 02 load-id Redefines loadid. 03 prefix-id TYPE character 5. 03 interval-id TYPE character 3. 02 system-name TYPE character 8 HEADING "SYSTEM/NAME". 02 os-version. 03 letter TYPE character 1. 03 number TYPE binary 8 DISPLAY "m".
Examples of RECORD Statements and FIND Queries Example B-3.
Examples of RECORD Statements and FIND Queries Example B-4.
Examples of RECORD Statements and FIND Queries Example B-5. Enform FIND Query for Unstructured PROCESS File (page 2 of 2) disp-rate := (process.dispatches / (process.delta-time / 1000000)), fault-rate := (page-faults / (process.delta-time / 1000000)), pres-pages := (pres-pages-qtime / process.delta-time), pres-pagem := pres-pages-max, ext-segs := (ext-segs-qtime / process.delta-time), ext-segsm := ext-segs-max, vsem-rate := (vsems / (process.delta-time / 1000000)), msg-rate := (messages-sent / (process.
Examples of RECORD Statements and FIND Queries Example B-6. DDL RECORD Statement for Entry-Sequenced PROCESS File (page 1 of 2) ?FUP PROCFUP RECORD procrep. FILE IS procrep ENTRY-SEQUENCED. 02 loadid PIC a(8) HEADING "LOAD/ID". 02 load-id Redefines loadid. 03 prefix-id TYPE character 5. 03 interval-id TYPE character 3. 02 from-timestamp TYPE binary 64. 02 to-timestamp TYPE binary 64. 02 delta-time TYPE binary 64. 02 system-name TYPE character 8 HEADING "SYS/NAME". 02 pid.
Examples of RECORD Statements and FIND Queries Example B-6. DDL RECORD Statement for Entry-Sequenced PROCESS File (page 2 of 2) 02 recv-qlen 02 recv-qlenm 02 recv-rate 02 vbyte-rate 02 ybyte-rate 02 link-rate 02 link-fail 02 links-inuse 02 links-inusem 02 chkpt-rate 02 accel-busy 02 tns-busy 02 comptrap-rate 02 tnsr-busy 02 page-sizeb 02 allocseq-rate 02 UCLqlen 02 UCLmax 02 fileopen-rate 02 infocall-rate TYPE binary 64,3 DISPLAY "m" HEADING "$RCV/RECV/QLEN".
C Loading Measure Data Into an SQL Table To create a structured data file and then load the data from the file into an SQL table: 1. Create a data dictionary using the DDL utility and MEASDDLS file: > DDL !?dict subvol ! !?source measddls !exit 2. Use MEASCOM to create a structured output data file. This example creates a file that contains data for all PROCESS entities in the measurement MEASFILE: > MEASCOM 1+ add measfile 2+ set report format structured 3+ list process *, rate off 3.
Loading Measure Data Into an SQL Table Measure User’s Guide —520560-003 C- 2
D Example of Measurement Application in C When programming in C or C++, refer to the C declarations in files MEASCHMA and MEASDECS to see whether a field is within a union. If the field is within a union, include the union name when writing code that uses the field. Existing C or C++ programs that use Measure data might not compile using the C structure declarations in new PVUs of Measure’s MEASCHMA or MEASDECS.
Example of Measurement Application in C Example D-1. Measurement Application in C (page 2 of 4) char DataFName[] = "MDATA"; char ExtDataFName[40]; short IntDataFName[12],DataFNum,Error,MeasNum,ActMeasNum; short cpus,BytesRead; long long StartTime,StopTime,Interval,FCall; short i, Len; long Entities[MAX_T], CounterSpace[MAX_T]; printf("Initializing contab header record...\n"); CPURec.Header.type = CONTAB_T; CPURec.Header.len = sizeof(CPURec); for (i = 0; i <= MAX_T; ++i) CPURec.Header.u_sections.
Example of Measurement Application in C Example D-1. Measurement Application in C (page 3 of 4) if (Error != 0) { printf("MEASOPEN ERROR %d\n",Error); } printf("Configuring CPU measurement...
Example of Measurement Application in C Example D-1. Measurement Application in C (page 4 of 4) printf("Opening Data file for analysis...\n"); Error = MEASOPEN(IntDataFName,&DataFNum,FALSE,TRUE); if (Error != 0) { printf("MEASOPEN ERROR %d\n",Error); } printf("Doing Analysis...\n"); FCall = 0; do { Error =MEASREAD(DataFNum,(short*)&CPURec.EDesc,(short*) &CpuData,(short)sizeof(CpuData),&BytesRead, &FCall); printf("cpu_num = %d\n",CpuData.cpu_num); }while(FCall != 0); printf("Stopping Measure subsystem...
E Converting Existing Applications or Enform Reports to ZMS Style Record Formats This appendix describes how to convert existing Enform reports or existing applications to ZMS-style record formats. Because legacy-style records are still supported, you are not required to convert existing applications or Enform reports to ZMS-style record formats. However, because ZMS-style record management lets you store data from multiple release levels in a common file structure, you might want to convert.
Converting Existing Applications or Enform Reports to ZMS Style Record Formats Application Conversion Considerations Field Reason for Removal All max-qlen fields Max queue values were of questionable use in the legacy interface and are removed in the ZMS style. Measure architecture is moving to a model in which counter records always exist, so such values would represent a maximum since processor reload and could never be reset. entity.ctrl entity.
Index A Abbreviating commands online help 2-12 using 2-5/2-6 Aborted measurements 2-6, 3-11 Accelerated code samples 4-28/4-30 Accumulating counter 3-5, 5-6 Active counters See Counter records Active measurements See Measurements, active ADD COUNTER command 2-2, 5-6, 5-7 ADD entity-type command 2-2, 3-3 ADD literal 5-2 ADD MEASUREMENT command 2-2, 3-11, 3-12, 3-17 ADD PLOT command 2-2, 4-11/4-12, 4-19 ADD USERDEF command 5-6 Alternate-key files 7-14 ANSI SQL name support 1-4 Applications performance problem
D Index Command (OBEY) file modifying, for systems running G-series RVUs 2-13 using output as 2-8 Commands See also individual commands online help 2-9 rules for entering 2-1/2-6 summary of 2-2/2-8 COMMENTS command 2-4 Concurrent measurements 3-16, 5-7 Configuration table 6-6/6-7 Configuring a measurement example, using command interface 3-6 for first performance evaluation 7-2, 7-9 getting configuration information 6-21/6-23 overview 3-1/3-3 using programmatic interface 6-6/6-7 using the programmatic int
E Index DDL record definitions in MEASDDLS file 4-33, 6-14 user-defined A-5 Declarations files EXTDECS0 6-3 MEASDECS 6-4/6-5 DECLARE statement (Enform) A-3 DECQUEUE literal 5-2 DELETE COUNTER command 2-2, 5-6 DELETE entity-type command 2-2, 3-3 DELETE MEASUREMENT command 2-2, 3-11 DELETE PLOT command 2-2, 4-12/4-13, 4-19 DELETE USERDEF command 5-6 Density, plot 4-26/4-27 DICT files 4-34 DISC counter names for cache counters 4-5 DISCOPEN entities, restriction regarding active counters and 3-17 Disk cache a
G Index File handler See MEASFH process File names for processes 3-14 File Utility Program See FUP File-system errors 3-10/3-11 FIND statement (Enform) A-6 firstcall variable 6-14 FOR attribute PLOT object 4-15 REPORT window 4-4 FOR clause with LIST entity-type command 4-6 with LIST PLOT command 4-27 with LISTACTIVE entity-type command 3-17, 3-18, 4-6 with LISTALL entity-type command 3-16, 4-6 with START MEASUREMENT command 3-6, 3-7 FORMAT attribute (REPORT object) 4-3, 4-6, 4-31 Fragmented files 7-14 FRO
L Index L Logging to files 2-8 Len field in configuration table header record 6-6 LIST entity-type command and plot data 4-11, 4-19 BY and IF clauses 4-5/4-6 FROM, FOR, and TO clauses 4-6 overview 2-2, 4-1 using 3-12/3-15 with USERDEF object 5-7 LIST PLOT command configuring measurements 2-3 generating plots 4-16 INTERVAL clause 4-22 plot attribute settings 4-15 LIST statement (Enform) A-6 LISTACTIVE entity-type command configuring measurements 2-2 controlling 4-1 FOR clause 3-18, 4-6 restrictions 4-5 u
M Index MEASCTL process (continued) action (continued) writing counter values to data file 3-4, 3-11, 6-17, 6-20 description of 1-5 reply buffer size limitation 6-18 stopping, from Multilan 2-6 MEASDDLB file 1-5 MEASDDLF file 1-5 MEASDDLS file 1-5, 6-14 MEASDDLZ file 1-6 MEASDECS file 1-6, 5-2, 6-3, 6-4 MEASFH process action at measurement startup 3-4 creating data file 3-5, 6-9 freeing disk space 3-11 indexing data file 3-4 purging old data file 3-5 reading counter values from data file 3-12 writing data
N Index Measurements (continued) examples of (continued) using command interface 3-6 file-system errors during 3-10/3-11 for system tuning 7-2, 7-9 inactive, displaying configuration of 6-21 restarting 6-21/6-23 starting 3-4, 3-5/3-7, 6-9/6-10 stopping 3-4, 3-7 Memory requirements for LIST command 3-15 Memory use 7-11/7-12 Message quick cells (MQC) 7-21 Messages code 3204 6-21 code 3405 6-18 file-system error 45 3-10 message 3302 3-8 message 3407 3-11 online help 2-9 Migrating from D-series to G-series mo
Q Index PLOT object default attribute settings 4-13 examples of with ADD command 4-11/4-12, 4-19 with DELETE command 4-12/4-13, 4-19 with INFO command 4-12 with LIST command 4-15/4-16, 4-19, 4-22 with RESET command 4-15 with SET command 4-15 with SHOW command 4-13 with VERT-BASE attribute 4-23 with WIDE-ITEM attribute 4-26 table of attributes 4-14 Plots See also Bar graphs defining 4-11/4-12 deleting definitions of 4-12/4-13 displaying definitions of 4-12 examples of changing density 4-26 changing scale 4
S Index Reports See also Plots description 1-3 examples of brief format 4-7 interpreted counter values 4-8 normal format 4-7 time window 4-6/4-8 uninterpreted counter values 4-9 generating with Enform 4-34, A-1/A-18 with LIST command 3-12/3-15 with LISTACTIVE command 3-17/3-18 with LISTALL command 3-15/3-16 with NonStop SQL/MP 4-34, C-1 overriding attribute values in 4-5 resetting attribute values in 4-4 setting attribute values in 4-2 specifying format 4-1/4-9 specifying interpreted or uninterpreted coun
T Index Subsystem, Measure (continued) stopping 2-6/2-7, 6-7/6-9 Swap activity balancing, across disks 7-13 excessive 7-10/7-12 SWAPVOL command 2-4 SYSTEM command 2-4 System performance See Performance problems and Tuning and balancing a system System, sample diagram of 7-5/7-7 T TACL STATUS command 4-33 TAL compiler 6-3 TAL source file 6-14 TIME command 2-4 TIME-BASE attribute (PLOT object) 4-15 TNS code samples 4-28/4-30 TNS/R native code samples 4-28/4-30 TO attribute PLOT object 4-15 REPORT window 4-
Special Characters Index ZERO-VALUES attribute (REPORT object) 4-4, 4-6 Special Characters ! command 2-4 # (pound symbol) 4-30 ?SOURCE command (TAL) 6-3 Measure User’s Guide —520560-003 Index- 11
Special Characters Index Measure User’s Guide —520560-003 Index -12