Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API

Similar presentations


Presentation on theme: "© 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API"— Presentation transcript:

1 © 2002 page 1 ITUG Summit —31 October San Jose, California ASAP Extension API

2 © 2002 page 2 A Brief Overview of ASAP An Availability Monitoring Infrastructure for HP NonStop™ Servers Engineered specifically for NonStop Server Architecture Includes NonStop Server Agents, Process-pairs, and Relational Stats & SLO Databases Components automatically Restart and Reconfigure, even when CPUs or devices go up/down

3 © 2002 page 3 What ASAP is not ASAP is not an Enterprise Management Framework HP OpenView CA Unicenter Tivoli Netview ASAP only provides an availability monitoring infrastructure However ASAP does provide: System and subsystem agents Published interfaces for custom agents Adapter interfaces to Enterprise Management Frameworks

4 © 2002 page 4 What ASAP monitors System Objects CPUs, Disks, Expand LHs, Nodes, Systems, Tape Drives,.. Subsystem Domains Busy Processes, Files, Selected Processes, RDF, Spooler, TMF,... Application Domains ATMs, Accounts, Customers, Orders, or anything else...

5 © 2002 page 5 What ASAP does with its information Generates Alerts EMS events SNMP traps Stores data in a relational database Displays data on ASAP Client Forwards data to Enterprise Management Frameworks

6 © 2002 page 6 ASAP Alerts :42:01 \CENTDIV.$ZOOK *TANDEM.226.V ASAP ALERT Expandip $Ipisl Status Connecting :42:01 \CENTDIV.$ZOOT *TANDEM.226.V ASAP ALERT Process $Joe Status Down :42:02 \CENTDIV.$ZOOJ *TANDEM.226.V ASAP ALERT Disk $Rtool1 Status Mirror Disk Reviving :49:02 \CENTDIV.$ZOOH2 *TANDEM.226.V ASAP ALERT Funds Transfer\$Y077 Status Lost Trans :49:02 \CENTDIV.$ZOOH3 *TANDEM.226.V ASAP ALERT Atm Chicago\East\$Atm2 Status Cash Low

7 © 2002 page 7 ASAP Client Browsing paradigm for access to objects Graph and Grid views Tree View Object navigation Accesses many objects Drives Graph/Grid State Information: Propagated upward “always visible” state

8 © 2002 page 8 Availability Vectors Illustrates host-based analysis engine Availability is determined by: Pre-defined rules (SLO) Analysis of each property of an object Aggregation of data Status, Performance and SLO information presented uniformly

9 © 2002 page 9 Registering an Application error=ASAP_REGISTER_ ( domain^name:name^len, seg^offset, [ error^detail ], [ segment^id ], [ segment^base ], [ version ], [ asap^id:id^len ], [ flags ], [ timeout ] ) extensible; Shared Memory Data Items Boundary Tag Checksum Control Info ASAPXMON Registration Request

10 © 2002 page 10 Updating In-Memory Data Shared Memory Data Items Boundary Tag Checksum Control Info ASAPXMON error=ASAP_UPDATE_( seg^offset, [ error^detail ], data^item, value, [ math ] ) extensible; “Enabled” “Trams A” “Broken” Data can be: - Counters - Time Units - Constants - Numeric - Text

11 © 2002 page 11 Shared-Memory Architecture Shared Memory Data Items Boundary Tag Checksum Control Info ASAPXMON “Enabled” “Trams A” “Broken” Non-Blocking Architecture No inter-process messages No semaphores Ultra-High Performance Memory updates only No App computations/feeds Memory Fully Protected Checksums Boundary tags

12 © 2002 page 12 Shared-Memory Architecture Extensible Shared Memory Segment ASAPXMON CPU 0CPU 1CPU 2CPU 3CPU 4CPU 5 ASAPXSGPASAP Aggregates Atm\Server\Authenticate\# 12 Domains

13 © 2002 page 13 Data-Gathering and Computation Data Items Boundary Tag Checksum Control Info “Enabled” “Trams A” “Broken” Entity Definitions ASAP/X :42:01 \CENTDIV.$ZOOK *TANDEM.226.V ASAP ALERT Expandip $Ipisl Status Connecting :42:01 \CENTDIV.$ZOOT *TANDEM.226.V ASAP ALERT Process $Joe Status Down :42:02 \CENTDIV.$ZOOJ *TANDEM.226.V ASAP ALERT Disk $Rtool1 Status Mirror Disk Reviving :49:02 \CENTDIV.$ZOOH2 *TANDEM.226.V ASAP ALERT Funds Transfer\$Y077 Status Lost Trans :49:02 \CENTDIV.$ZOOH3 *TANDEM.226.V ASAP ALERT Atm Chicago\East\$Atm2 Status Cash Low Objectives Data Formulas Objectives Alerts ASAP DB Records

14 © 2002 page 14 Computing Transaction Rate Data Items Boundary Tag Checksum Control Info “Enabled” “Trams A” “Broken” DataItem Type: I MetricRule: #2/S Format: F5.3 Heading: TransRate Objective: > 9.0 Critical /60 = If (8.067 > 9.000) False -> State NOT OK Current Sample Previous Sample #2 Result MetricRule Formula Format Objective Compare ASAP Sampling Interval: 1 minute TransRate: TransRateState: Alert Generate EMS Critical Event

15 © 2002 page 15 Representing an Application ATM Deposits Withdrawals Transfers Inquiries Devices Requesters Servers Database Chicago Phoenix Seattle Atlanta

16 © 2002 page 16 Application Name Space BusinessServiceDeveloper

17 © 2002 page 17 Determining What to Measure Availability/Health Metrics Transaction Rates Error Rates Response Time Status Indicators Capacity/Historical Metrics Wait times Busy percentages Usage information

18 © 2002 page 18 Consider Multiple ASAP Environments Shared Memory Rate 1 minute Health Monitor ASAPXMON error=ASAP_UPDATE_ ( seg^offset, [ error^detail ], data^item, value, [ math ] ) extensible; Shared Memory Rate 1 hour Capacity Monitor ASAPXMON Capacity Data Health Data

19 © 2002 page 19 Implementation Example Determine Application Name Space  Service View Example: Atm\Dallas\East\ParkSt Determine What to Measure  Cash in ATM Success Percent Response Time Card Reject Count DataItems Transaction count (I) Error count (I) Processing time (U) Cash remaining (C) Card rejects (I) I - integer S,M,U - time units C - constant

20 © 2002 page 20 Define the Application in ASAP EDL First copy APP EDL file from ASAP2APP EDL file Save and modify new file to create the Application EDL ENTITY ATM Command "APP\*ATM,DETAIL,RAW,TAB,STATE,AGGREGATE" Detail "APP^,TAB,STATE,DETAIL” DataItems "0 C, 1 I, 2 I, 3 U, 4 I" Enabled YES Help “ATM Application” MaxObjectives 200 Version ;

21 © 2002 page 21 Define all Metrics in ASAP EDL Add custom metric (EDL Attribute) definitions to the end of new EDL file, copy Error and ErrorState attribute pairs. AT Cash Grid YES Graph NO GraphMax 3000 Format “I6” Help ”Cash remaining in ATM" StatePair YES StateRule UseStateGraphState MetricRule “#0" TypeData REAL64; AT S0 Grid NO Graph NO GraphMax 9 Help "State of Cash "; Do not modify any of the other original Attribute definitions from the original APP EDL file.

22 © 2002 page 22 Example EDL File ENTITY ATM CI ASAP Command "APP\*ATM,DETAIL,RAW,TAB,STATE,AGGREGATE" Detail "APP^,TAB,STATE,DETAIL" DataItems "0 C, 1 I, 2 I, 3 U, 4 I" Enabled YES ErrorState ErrorState Help "My application description" KeyForNode NodeName KeyForObj Domain KeyForRow "Dateymd Time" MaxObjectives 200 SGPFile ASAPXSGP SGPManaged YES SGPSuffix H Reserved NO Version ;”

23 © 2002 page 23 Required Header Attributes AT NodeName Grid YES Graph NO GraphMax 0 Help "NSK System Name"; AT Sysnum Grid NO Graph NO GraphMax 0 Help "System Number"; AT Domain Grid YES Graph NO GraphMax 0 Help "Domain Name"; AT Status Grid YES Graph YES GraphMax 0 Help "Operational Status” StatePair YES StateIsOp YES StateRule UseStateGraphState TypeData CHAR15; AT OpState Grid NO Graph NO GraphMax 9 Help "Operational State"; AT Dateymd Grid NO Graph NO GraphMax 0 Help "Date of Stats"; AT Time Grid YES Graph YES GraphMax 0 Help "Time of Stats";

24 © 2002 page 24 Required Header Attributes AT Valid Grid NO Graph NO GraphMax 0 Help "Validity Flag"; AT ET Grid NO Graph NO GraphMax 0 Help "Elapsed Time in Minutes"; AT CT Grid NO Graph NO GraphMax 0 Help "Count of Attributes";\ AT Error Grid YES Graph NO GraphMax 0 Format I4 Help "Collection Error” StatePair YES StateRule UseStateGraphState TypeData INT64; AT ErrorState Grid NO Graph NO GraphMax 9 Help "State of Error"; [ Custom attributes go after the Error and ErrorState Attribute Pair ]

25 © 2002 page 25 Custom Attributes AT Cash Grid YES Graph NO GraphMax 3000 Format "I6” Help "Cash remaining in ATM” StatePair YES StateRule UseStateGraphState MetricRule "#0" TypeData REAL64; AT S0 Grid NO Graph NO GraphMax 9 Help "State of Cash "; AT Success Grid YES Graph NO GraphMax Format "F6.2” Help ”Success Percent” StatePair YES StateRule UseStateGraphState MetricRule "#1/(#1 + #2) * C100" TypeData REAL64; AT S1 Grid NO Graph NO GraphMax 9 Help "State of Success";

26 © 2002 page 26 Custom Attributes AT RespTime Grid YES Graph NO GraphMax 10 Format "F10.7” Help "Server response time” StatePair YES StateRule UseStateGraphState MetricRule "#3/(#1 + #2)" TypeData REAL64; AT S2 Grid NO Graph NO GraphMax 9 Help "State of RespTime "; AT Rejects Grid YES Graph NO GraphMax 100 Format "I3" Help "Card rejects" StatePair YES StateRule UseStateGraphState MetricRule "#4" TypeData REAL64; AT S3 Grid NO Graph NO GraphMax 9 Help "State of Rejects";

27 © 2002 page 27 Complete EDL File ENTITY ATM CI ASAP Command "APP\*ATM,DETAIL,RAW,TAB,STATE,AGGREGATE" Detail "APP^,TAB,STATE,DETAIL" DataItems "0 C, 1 I, 2 I, 3 U, 4 I" Enabled YES ErrorState ErrorState Help "My application description" KeyForNode NodeName KeyForObj Domain KeyForRow "Dateymd Time" MaxObjectives 200 SGPFile ASAPXSGP SGPManaged YES SGPSuffix H Reserved NO Version ; AT NodeName Grid YES Graph NO GraphMax 0 Help "NSK System Name"; AT Sysnum Grid NO Graph NO GraphMax 0 Help "System Number"; AT Domain Grid YES Graph NO GraphMax 0 Help "Domain Name"; AT Status Grid YES Graph YES GraphMax 0 Help "Operational Status" StatePair YES StateIsOp YES StateRule UseStateGraphState TypeData CHAR15; AT OpState Grid NO Graph NO GraphMax 9 Help "Operational State"; AT Dateymd Grid NO Graph NO GraphMax 0 Help "Date of Stats"; AT Time Grid YES Graph YES GraphMax 0 Help "Time of Stats"; AT Valid Grid NO Graph NO GraphMax 0 Help "Validity Flag"; AT ET Grid NO Graph NO GraphMax 0 Help "Elapsed Time in Minutes"; AT CT Grid NO Graph NO GraphMax 0 Help "Count of Attributes"; AT Error Grid YES Graph NO GraphMax 0 Format I4 Help "Collection Error" StatePair YES StateRule UseStateGraphState TypeData INT64; AT ErrorState Grid NO Graph NO GraphMax 9 Help "State of Error"; AT Cash Grid YES Graph NO GraphMax 3000 Format "I6" Help "Cash remaining in ATM" StatePair YES StateRule UseStateGraphState MetricRule "#0" TypeData REAL64; AT S0 Grid NO Graph NO GraphMax 9 Help "State of Cash "; AT Success Grid YES Graph NO GraphMax Format "F6.2” Help ”Success Percent" StatePair YES StateRule UseStateGraphState MetricRule "#1/(#1 + #2) * C100" TypeData REAL64; AT S1 Grid NO Graph NO GraphMax 9 Help "State of TotalRate "; AT RespTime Grid YES Graph NO GraphMax 10 Format "F10.7” Help "Server response time" StatePair YES StateRule UseStateGraphState MetricRule "#3/(#1 + #2)" TypeData REAL64; AT S2 Grid NO Graph NO GraphMax 9 Help "State of RespTime "; AT Rejects Grid YES Graph NO GraphMax 100 Format "I3” Help "Card rejects" StatePair YES StateRule UseStateGraphState MetricRule "#4" TypeData REAL64; AT S3 Grid NO Graph NO GraphMax 9 Help "State of Rejects";

28 © 2002 page 28 What Next? Load EDL onto NSK Servers Add Include statement to ASAPUSER file Load EDL onto ASAP Client workstations C:\Program Files\Tandem\Asap\Edl Install using Client IDE Test EDL using ASAPXTST API test program Located in ASAPX ISV Implement ASAP API in the Application

29 © 2002 page 29 Enabling the Client IDE Click here to bring up the Properties sheet

30 © 2002 page 30 Enabling Import/Export EDL Double click here to bring up the EDL Properties sheet Turn on the IDE to enable File - Import/Export EDL

31 © 2002 page 31 Client IDE First, click on your EDL file Then click the compile button

32 © 2002 page 32 ASAPXTST 1+ register please enter: domain^name(): atm\test segment^id(): segment^base(): version(): asap^id:id^len("$ZOO":4): flags(): timeout(): error: 0 error^detail: 0 result: domain registered 2+ The procedure declaration (not shown) is output here.

33 © 2002 page 33 ASAPXTST 2+ update Domains Currently Registered Dmn# Seg^Offset A^ID F Vs Domain Name $ZOO 0 ATM\TEST select a domain to update(): 0 seg^offset( ): data^item(): 0 value(): 10 math(): error: 0 error^detail: 0 result: domain updated The procedure declaration (not shown) is output here.

34 © 2002 page 34 Java public class ASAPX extends java.lang.Object { static { System.loadLibrary("ASAPXJNI"); } // Initializer public static final native short AsapRegister(java.lang.String Domain, int[] SegmentOffset, short[] ErrorDetail);

35 © 2002 page 35 Java public static final native short AsapUpdate (int SegmentOffset, short[] ErrorDetail, short DataItem, long Value, short Math); public static final native short AsapRemove (int SegmentOffset, short[] ErrorDetail, short SegmentID, short Flags); } // class ASAPX

36 © 2002 page 36 Java public class MainClass extends java.lang.Object { public static void main(java.lang.String[] args) { java.lang.String MyAppDomainName = "CreditCard\\Chicago"; int[] SegmentOffset = new int[1]; short[] ErrorDetail = new short[1]; short ReturnCode; ReturnCode = ASAPX.AsapRegister(MyAppDomainName, SegmentOffset, ErrorDetail); if (ReturnCode != 0)

37 © 2002 page 37 Java { System.out.println("Error: Could not register " + MyAppDomainName); System.out.println("Detailed error number: " + ErrorDetail[0]); System.out.println("Exiting..."); return; } while (true) { ReturnCode = ASAPX.AsapUpdate(SegmentOffset[0], ErrorDetail, (short)0, 1L, (short)0); if (ReturnCode != 0) { System.out.println("Error: Could not update ASAPX”); System.out.println(“Detailed error number: " + ErrorDetail[0]); break; }

38 © 2002 page 38 Java // Get next request } // while loop ReturnCode = ASAPX.AsapRemove(SegmentOffset[0], ErrorDetail, (short)0, (short)1); if (ReturnCode != 0) { // Error removing our domain System.out.println("Error: Could not remove " + MyAppDomainName); System.out.println("Detailed error number: " + ErrorDetail[0]); System.out.println("Exiting..."); } } // main } // class MainClass

39 © 2002 page 39 C++ #ifndef __ASAPBASEH #define __ASAPBASEH #include "zaspxc.h” class AsapBase { public: AsapBase(); virtual ~AsapBase(); short AsapRegister(short flags=0); short AsapUpdate(short dataItem, long long val, short math=0); protected: bool Connected; long long LastTime; char Domain[64]; long SegmentOffset; }; #endif // __ASAPBASEH

40 © 2002 page 40 C++ #include “ASAPBASE.h” #include short AsapBase::AsapRegister(short flags) { short Error, ErrorDetail; long long ThisTime = JULIANTIMESTAMP() - LastTime, RetryTime = ; if(Connected) return 0; if(ThisTime < RetryTime) return 0; LastTime = JULIANTIMESTAMP(); strcopy(Domain,”Test\\Domain”); error = ASAP_REGISTER_(Domain, strlen(Domain), &SegmentOffset,&ErrorDetail); if(error == 0) Connected = true; else {

41 © 2002 page 41 C++ short AsapBase::AsapUpdate(short dataItem, long long value, short math) { short Error, ErrorDetail; short Flags = 0; if(!Connected) { error = AsapRegister(Flags); if (error != 0) return error; if (!Connected) return -1; } error = ASAP_UPDATE_(SegmentOffset, &ErrorDetail, dataItem, value, math); if (error != 0) { }

42 © 2002 page 42 pTAL int(32) asap^offset := 0d,.ext asap^offset2; ?nolist, source zaspxtal ?nolist, source $system.system.asapxdec ?library $system.system.asapxlib proc do^asap(ditem,val,math) extensible; int ditem; int(64) val; int math; forward; proc do^asap(ditem,val,math) extensible; int ditem; int(64) val; int math; begin string.dname[0:11] := ["NONSTOP\DEMO"]; int err := 0, err^dtl := 0; if asap^offset = 0d then := $xadr(asap^offset); if (err := asap_register_(dname:12, asap^offset2, err^dtl)) <> 0 then asap^offset := 0d; end; if asap^offset = 0d then return;

43 © 2002 page 43 pTAL if (err := asap_update_(asap^offset,err^dtl,ditem,val, $optional($param(math),math))) <> 0 then begin err := asap_remove_(asap^offset,err^dtl,,1); asap^offset := 0d; end; end; -- of proc do^asap

44 © 2002 page 44 ASAPX Feature Review Conversion to ASAP DOTs Multiple Entity/EDL support Built-in attributes Aggregation Status/OpState API Text constants Register timeout

45 © 2002 page 45 ASAPX Futures DataItems increased and configurable In-Memory record retrieval DataItem aggregation control No History mode Java Package C++ Class Library HP OpenView integration

46 © 2002 page 46 Information Resources Presentations Papers, FAQs Online demonstration Education TUT CD #30 Oct Manuals TIM Independent Products CD

47

48


Download ppt "© 2002 page 1 ITUG Summit 2002 27—31 October San Jose, California ASAP Extension API"

Similar presentations


Ads by Google