Download presentation
Presentation is loading. Please wait.
Published byDiana Cecilia Hawkins Modified over 9 years ago
1
DONE02: Where Did You Go Wrong? Diagnostics and Troubleshooting in OpenEdge Kris Murphy Senior Solution Engineer
2
2© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Agenda n Diagnostic & Troubleshooting Tools Overview n Common Troubleshooting Situations –Memory Leak –Performance Issue –Error in AppServer™ code n Planned for OpenEdge™10.1A
3
3© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Diagnostic & Troubleshooting Tools n GUI Debugger n Logging Infrastructure n LogRead n Profiler n Pro*Spy Plus
4
4© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? GUI Debugger n Modern Java™ graphical interface n Initial Technology Preview 9.1D SP 05 n First official release OpenEdge™ 10 n Supports local and remote debugging n Supported on Windows and all versions of UNIX that support Java
5
5© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? For Your Application Safety… n Client –Start → Programs → OpenEdge → Proenv n AppServer™ Debugging is NOT enabled by default
6
6© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? GUI Debugger n AppBuilder or Procedure Editor –Compile → Debug –Can step into AppServer code from Client session DEFINE VARIABLE debug AS LOGICAL. debug = DEBUGGER:INITIATE(). debug = DEBUGGER:SET-BREAK(“dordbug.p",6). n Programmatically –DEBUGGER system handle methods –Initiate debugging in AppServer or WebSpeed ® code
7
7© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Main Debugger Window Toolbar Right Click - Dataviews View\Hide Panes Organized by type Source Code 4GL Procedure Stack Variables Watches Menubar
8
8© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Source Code Pane n Shows code n Breakpoints –Set –Remove –Enable/Disable n Arrow current line of execution
9
9© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? 4GL Procedure Stack Pane
10
10© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Variables Pane n Variables n Parameters n Buffers n Temp Tables n D ataSets
11
11© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Watches Pane n Type variable directly in watches pane n Keeps track of variables, buffer fields, attributes, etc.
12
12© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? More Variable Detail - Dataview n Additional information n Debug Dataview
13
13© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Quick Dataviews n Data List of SYSTEM HANDLES
14
14© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Traversing NEXT-SIBLING
15
15© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Conditional Breakpoints
16
16© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Watchpoints
17
17© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Diagnostic & Troubleshooting Tools n GUI Debugger n Logging Infrastructure n LogRead n Profiler n Pro*Spy Plus
18
18© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Logging Infrastructure n We had logging in Progress® V9. We just made it better in OpenEdge 10! –Easier to get rid of “noise” in the logs –Unified format –Control Log Size –New log entry types n Logging Infrastructure –Log entry types –Logging levels –Log size threshold –LOG-MANAGER
19
19© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Log Entry Types 4GL Interpreter n 4GLTrace n DB.Connects n DynObjects.* n QryInfo n SAX n ProEvents.* - logentrytypes DynObjects.DB,QryInfo Client n 4GLMessages Other Components n AS.Plumbing n AS.Default n MsgrTrace n NameServer
20
20© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Logging Levels n 0 – None n 1 – Errors n 2 – Basic n 3 – Verbose n 4 – Extended -logginglevel 2 -logentrytypes DynObjects.UI:3,qryInfo
21
21© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Log File Has Size Threshold n Startup Parameters –Log Threshold –Keep Log Files n Progress Explorer -numlogfiles -logthreshold
22
22© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? LOG-MANAGER n Runtime access n Setting log file name LOG-MANAGER:LOGFILE-NAME = “Mylog.log”. n Setting logging level LOG-MANAGER:LOGGING-LEVEL = 2. n Starting LOG-MANAGER:LOG-ENTRY-TYPES = “4GLTrace”. n Stopping LOG-MANAGER:LOGGING-LEVEL = 0.
23
23© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Diagnostic & Troubleshooting Tools n GUI Debugger n Logging Infrastructure n LogRead n Profiler n Pro*Spy Plus
24
24© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? LogRead n GUI utility to view, filter, sort, merge and translate Progress log files n Not officially supported –On-line Help n Available on PSDN
25
25© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Loading a Log File n Log file format n Date format n Time adjustment n Promsgs translation n Date Range Filter
26
26© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? LogRead Log View Utilities Queries
27
27© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Sample
28
28© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Analyze the Merge
29
29© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? LogRead Planned Enhancement n Users can write their own: –Utilities to help analyze log files –Handlers to load other types of log files n Microsoft IIS log file
30
30© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Diagnostic & Troubleshooting Tools n GUI Debugger n Logging Infrastructure n LogRead n Profiler n Pro*Spy Plus
31
31© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Profiler n Provides profile of procedure execution n Analyze where most time is spent n Not officially supported n Available on PSDN
32
32© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Profiler
33
33© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Profiler
34
34© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Diagnostic & Troubleshooting Tools n GUI Debugger n Logging Infrastructure n LogRead n Profiler n Pro*Spy Plus
35
35© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Pro*Spy Plus n Debugging tool used to trace the execution of a 4GL program n Can be turned on and off at the beginning or during execution n Results of tracing, which include all procedures, triggers, and functions appear in a browse widget
36
36© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Pro*Spy Plus – Example
37
37© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Pro*Spy Plus – Example
38
38© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Pro*Spy Plus – Example
39
39© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Agenda n Diagnostic & Troubleshooting Tools Overview n Common Troubleshooting Situations –Memory Leak –Performance Issue –Error in AppServer™ code n Planned for OpenEdge 10.1A
40
40© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Memory Leak n Memory is allocated and never freed n Application may slow down, and it may affect the system as a whole n Dynamic Objects, Memptrs n Tools for diagnosing –Logging n -LogEntryType DynObjects.* n LogRead –Debugger n Dynamic Object Tracker
41
41© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Memory Leak - Logging LOG-MANAGER:LOGFILE-NAME = “memleak.log”. LOG-MANAGER:LOG-ENTRY-TYPES = “DynObjects.*”. LOG-MANAGER:LOGGING-LEVEL = 3. CREATE TEMP-TABLE tth. bufHdl = BUFFER customer:HANDLE. tth:CREATE-LIKE(bufHdl). CREATE TEMP-TABLE tth2. bufhdl2 = BUFFER order:HANDLE. tth2:CREATE-LIKE(bufhdl2). CREATE QUERY qh. DELETE OBJECT tth. DELETE OBJECT qh. LOG-MANAGER:LOGFILE-NAME = “”. LOG-MANAGER:LOGFILE-NAME = “memleak.log”. LOG-MANAGER:LOG-ENTRY-TYPES = “DynObjects.*”. LOG-MANAGER:LOGGING-LEVEL = 3. CREATE TEMP-TABLE tth. bufHdl = BUFFER customer:HANDLE. tth:CREATE-LIKE(bufHdl). CREATE TEMP-TABLE tth2. bufhdl2 = BUFFER order:HANDLE. tth2:CREATE-LIKE(bufhdl2). CREATE QUERY qh. DELETE OBJECT tth. DELETE OBJECT qh. LOG-MANAGER:LOGFILE-NAME = “”. LOG-MANAGER:LOGFILE-NAME = “memleak.log”. LOG-MANAGER:LOG-ENTRY-TYPES = “DynObjects.*”. LOG-MANAGER:LOGGING-LEVEL = 3. CREATE TEMP-TABLE tth. bufHdl = BUFFER customer:HANDLE. tth:CREATE-LIKE(bufHdl). CREATE TEMP-TABLE tth2. bufhdl2 = BUFFER order:HANDLE. tth2:CREATE-LIKE(bufhdl2). CREATE QUERY qh. DELETE OBJECT tth. DELETE OBJECT qh. LOG-MANAGER:LOGFILE-NAME = “”.
42
42© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Memory Leak - Logging
43
43© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Memory Leak - LogRead Utilities FindDynObjLeak
44
44© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Memory Leak - Dynamic Object Tracking n Diagnostics Monitor Dynamic Objects
45
45© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Dynamic Object Tracking /* ttdelay.p */ CREATE TEMP-TABLE ttHdl1. bufHdl = BUFFER customer:HANDLE. ttHdl1:CREATE-LIKE(bufHdl). ttHdl1:TEMP-TABLE-PREPARE("ttcust"). RUN dyn (TABLE-HANDLE ttHdl1, OUTPUT TABLE-HANDLE ttHdl2). …
46
46© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Dynamic Object Tracking /* ttdelay.p Continued*/ Procedure dyn: DEFINE INPUT PARAM TABLE-HANDLE inhdl. DEFINE OUTPUT PARAM TABLE-HANDLE outHdl. … CREATE TEMP-TABLE outHdl. … outHdl:TEMP-TABLE- PREPARE(“ttorder”). DELETE OBJECT inhdl. END.
47
47© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? If you forgot to cleanup /* ttdelay.p Continued*/ DELETE OBJECT ttHdl1. DELETE OBJECT ttHdl2. RETURN. What did we forget to delete? /* ttdelay.p Continued*/ Procedure dyn: DEFINE INPUT PARAM TABLE-HANDLE inhdl. DEFINE OUTPUT PARAM TABLE-HANDLE outHdl. … CREATE TEMP-TABLE outHdl. … outHdl:TEMP-TABLE- PREPARE(“ttorder”). DELETE OBJECT inhdl. DELETE OBJECT outhdl. END.
48
48© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? If you forgot to cleanup n Dynamic Object tracking allows you to quickly identify your failure to delete objects
49
49© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Agenda n Diagnostic & Troubleshooting Tools Overview n Common Troubleshooting Situations –Memory Leak –Performance Issue –Error in AppServer™ code n Planned for OpenEdge 10.1A
50
50© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Performance Issues in the 4GL n Application is slow, queries take a long time to run n Inefficient index usage n Diagnostic Tools –INDEX-INFORMATION Attribute –Query-Info Logging –Profiler
51
51© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Performance – INDEX-INFORMATION Attribute qh:QUERY-PREPARE("FOR EACH customer WHERE name MATCHES ‘A*’”). qh:QUERY-OPEN. message qh:INDEX-INFORMATION(1) view-as alert-box. qh2:QUERY-PREPARE("FOR EACH item WHERE name BEGINS ‘A’”). qh2:QUERY-OPEN. message qh2:INDEX-INFORMATION(1) view-as alert-box.
52
52© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Performance – Query-Info Logging LOG-MANAGER:LOGFILE-NAME = “Query.log”. LOG-MANAGER:LOG-ENTRY-TYPES = “QryInfo:3”. RUN runQuery(INPUT "for each customer where name begins 'A'"). RUN runQuery(INPUT "for each customer where name matches 'A*'"). PROCEDURE runQuery: … hqry:QUERY-PREPARE(cQry). hqry:QUERY-OPEN(). … hqry:QUERY-CLOSE(). … END. LOG-MANAGER:LOGGING-LEVEL=0.
53
53© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Performance – Query-Info Logging – Query Plan n Query-Plan: how we extract information for the query including: –Query Type, Prepare String, Sorted, Scrolling
54
54© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Performance – Query-Info Logging Query Statistics n Query Statistics: information on the query as it extracts data from the database including: –Times prepared (Dynamic only) –Time to prepare (Dynamic only) –Database blocks accessed –Records sent from server n Useful n Failed
55
55© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Performance – Query-Info Logging Query Statistics Name BEGINS ‘A’ Name MATCHES ‘A*’
56
56© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Performance - Profiler
57
57© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Agenda n Diagnostic & Troubleshooting Tools Overview n Common Troubleshooting Situations –Memory Leak –Performance Issue –Error in AppServer code n Planned for OpenEdge 10.1A
58
58© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Error in AppServer code n Attachable Debugger –Server in another office / building –No monitor attached –Easier to debug from where you are
59
59© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Attachable Debugger n Start Attachable Debugger –Start → Programs → OpenEdge → Debugger n Ready the Client process for debugging –-debugReady port-number –proDebugConfig –Attachable Debugger
60
60© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Attachable Debugger
61
61© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Break on Error Message n From within the debugger: Edit Breakpoints
62
62© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Attachable Debugger
63
63© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Agenda n Diagnostic & Troubleshooting Tools Overview n Common Troubleshooting Situations –Memory Leak –Performance Issue –Remote Debugging n Planned for OpenEdge 10.1A
64
64© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? D I S C L A I M E R Coming in OpenEdge™ 10.1A n This talk includes information about potential future products and/or product enhancements. n What I am going to say reflects our current thinking, but the information contained herein is preliminary and subject to change. Any future products we ultimately deliver may be materially different from what is described here. D I S C L A I M E R
65
65© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Planned for OpenEdge 10.1A n User Logging n 4GL Tracing: Log “return” from procedure n Query-Info Logging Enhancements
66
66© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? In Summary n Diagnostic Tools Overview n Common Debugging & Troubleshooting Situations n To Learn More: –Debugging & Troubleshooting Guide –PSDN –On-line Help
67
67© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Questions?
68
68© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong? Thank you for your time!
69
69© 2005 Progress Software Corporation DONE 02: Where Did You Go Wrong?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.