cognos reportnet and windows performance counters

22
Tip or Technique ReportNet Windows Performance Counters Revealed Product(s): IBM Cognos ReportNet Area of Interest: Performance

Upload: others

Post on 12-Sep-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cognos ReportNet and Windows Performance Counters

Tip or Technique

ReportNet Windows Performance Counters Revealed

Product(s): IBM Cognos ReportNet

Area of Interest: Performance

Page 2: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 2

IBM Cognos Proprietary Information

Copyright Copyright © 2008 Cognos ULC (formerly Cognos Incorporated). Cognos ULC is an IBM Company. While every attempt has been made to ensure that the information in this document is accurate and complete, some typographical errors or technical inaccuracies may exist. Cognos does not accept responsibility for any kind of loss resulting from the use of information contained in this document. This document shows the publication date. The information contained in this document is subject to change without notice. Any improvements or changes to the information contained in this document will be documented in subsequent editions. This document contains proprietary information of Cognos. All rights are reserved. No part of this document may be copied, photocopied, reproduced, stored in a retrieval system, transmitted in any form or by any means, or translated into another language without the prior written consent of Cognos. Cognos and the Cognos logo are trademarks of Cognos ULC (formerly Cognos Incorporated) in the United States and/or other countries. IBM and the IBM logo are trademarks of International Business Machines Corporation in the United States, or other countries, or both. All other names are trademarks or registered trademarks of their respective companies. Information about Cognos products can be found at www.cognos.com This document is maintained by the Best Practices, Product and Technology team. You can send comments, suggestions, and additions to [email protected] .

Page 3: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 3

IBM Cognos Proprietary Information

Contents 1 INTRODUCTION............................................................................................ 4 1.1 PURPOSE ..............................................................................................................4 1.2 APPLICABILITY .......................................................................................................4 1.3 EXCLUSIONS AND EXCEPTIONS....................................................................................4 2 WINDOWS PERFORMANCE COUNTERS ........................................................ 4 3 THE IBM COGNOS REPORTNET (CRN) PERFORMANCE COUNTERS.............. 4 4 INSTALL CRN PERFORMANCE COUNTERS .................................................... 7 4.1 REGISTER THE DLL .................................................................................................7 4.2 MODIFY THE JAVA ENVIRONMENT ................................................................................8 4.2.1 Apache Tomcat, starting through startup.bat ................................................8 4.2.2 Apache Tomcat, starting as a Service (through IBM Cognos Configuration).............8 4.2.3 IBM WebSphere ..................................................................................................9 4.2.4 For BEA Weblogic................................................................................................9 4.3 ADD COUNTERS TO THE WINDOWS MMC ......................................................................9 5 UNINSTALLING PERFORMANCE COUNTERS............................................... 15 6 TROUBLESHOOTING ................................................................................... 16 APPENDIX A – CMACTIVITY COUNTERS ................................................................ 17 APPENDIX B – CMINTERNAL COUNTERS ............................................................... 21

Page 4: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 4

IBM Cognos Proprietary Information

1 Introduction

1.1 Purpose This document explains how to enable the built-in Windows performance counters for IBM Cognos ReportNet. It will further briefly explain what information they provide.

1.2 Applicability The information contained is only applicable for IBM Cognos ReportNet where the Content Manager component is on Windows operating system.

1.3 Exclusions and Exceptions The document does NOT apply to IBM Cognos 8 or any operating system other than Windows. IBM Cognos administrators should be aware that as of IBM Cognos 8, Windows Performance Counter support has been deprecated. The document will not explain the meaning and information which can be deducted from any specific metrics captured.

2 Windows Performance Counters

Windows performance counters monitor performance objects such as disk drives, CPU utilization, processes, threads, and memory. Many of these performance objects are included in all versions of Windows. Others are included only with specific applications or parts of the operating system. For example, the .NET runtime and SQL Server both define custom performance counters that monitor values that are unique to those applications. Included as part of IBM Cognos ReportNet is the ability to add performance counters specific to the ReportNet application.

3 The CRN Performance Counters

At a high level, IBM Cognos ReportNet can be described to consist of two Servlets deployed to a Java Servlet Container like Apache Tomcat or an Application Server like IBM WebSphere or BEA WebLogic. The Servlets implement multiple functions as part of a service Oriented Architecture (SOA). Monitoring of key metrics during operation is partially provided by the Monitoring tab in IBM Cognos Connections Server Administration. Sometimes, particularly for troubleshooting or critical operations, monitoring more detailed information is required. IBM Cognos ReportNet provides a library to integrate with the Performance monitoring facilities embedded into the Windows operating system. If installed, new performance counters become available on the Microsoft Management Console (MMC). Those counters expose metrics from the Content Manager Servlet and enable close monitoring of its operation. Consequently they are only available on the machine which has Content Manager installed.

Page 5: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 5

There are two sets of counters provided by CRN: • CM Activity Counters

A set of counters that provide metrics related to the current activity of the CM (Content Manager) Servlet. Usually it’s sufficient to monitor these solely. Their names are verbose enough to deduct their meaning and conclusions drawn from them are more or less trivial.

• CM Internals Counters in this set refer to aspects related to the inner workings of the CRN Servlet and may not be self-explaining. They should be used for troubleshooting only under the governance of IBM Cognos Customer Support. These counters are not publicly documented.

Refer to Appendices A and B for a list of counters in each set. Performance counters require being registered with the system in the Windows Registry. Depending on configuration, IBM Cognos ReportNet may or may not have added a new key to the registry already. Performance counters will use a dedicated service key which is different from a possible key registered when starting IBM Cognos ReportNet as a Windows Service. Each installed instance of IBM Cognos ReportNet on a system will have its own Service key registered if • within IBM Cognos Configuration the ReportNet Service resource is

configured and • the product has been started at least once through the configuration

console.

IBM Cognos Proprietary Information

Page 6: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 6

IBM Cognos Proprietary Information

The name of the service stored in the registry is the one given to the ReportNet service in IBM Cognos Configuration. If configured to a non-default port by choosing any other port than 9300 for the internal dispatcher URI the port number is appended, separated by a colon. In the configuration file crnstartup.xml this looks like this; the relevant elements are highlighted in bold red below.

<crn:parameters> <crn:parameter name="internalDispatcher"> <crn:value xsi:type="xsd:anyURI">http://localhost:9300/p2pd/servlet/dispatch</crn:value> </crn:parameter> <crn:parameter name="CBS" opaque="true"> <crn:value> <crn:instances name="cbs"> <crn:instance name="Cognos ReportNet" class="Small"> </crn:instance> </crn:instances> </crn:value> </crn:parameter> </crn:parameters>

The entry will be added to HKLM/SYSTEM/CurrentControlSet/Services. In the above example the entry saved to registry will be “HKLM/SYSTEM/CurrentControlSet/Services/Cognos ReportNet”. (default port, name of Service is “Cognos ReportNet”)

Upon pressing Start the service key get’s added to the registry if not already existent.

As mentioned above, performance counters will use a different key which is created independently of the general service key. The product may not have been started as a service ever, and hence no service key might exist at all. This however does not influence the creation of the key for the performance counters. It will be created in the same location and use the same steps to deduct a name from the configuration. For the performance counters the service name is the same as for the service but with an appended “ Performance” label. So referring to the same configuration as above a new key “HKLM/SYSTEM/CurrentControlSet/Services/Cognos ReportNet Performace” will be added.

If the internal dispatcher would run on Port 1234 the service name would be: “HKLM/SYSTEM/CurrentControlSet/Services/ Cognos ReportNet:1234 Performace”.

Page 7: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 7

IBM Cognos Proprietary Information

4 Install CRN Performance Counters

In the current versions of ReportNet, the performance counters are not configured by default. Previous releases that did create them automatically sometimes led to issues, although this is almost certainly due to misconfigurations rather than product issues. To enable the performance counters two steps are required. • First the DLL file included with the install needs to be registered with

Windows. • Secondly the Java environment in which Content Manager operates needs

to some additional properties configured.

4.1 Register the DLL Note: Some brief version of these instructions is to be found in "CRNPerfCounters__Win32_README.rtf" in the <CRN_ROOT>/bin directory.

1) Open a shell in the <CRN_ROOT>/bin directory 2) Execute

regsvr32 /i CRNWin32Perf.DLL

This will cause 1. the following files to be written to the <CRN_ROOT>/bin directory:

• CRNPerfCounters_Offsets.h • CRNPerfCounters_Text.ini

2. add the performance counter key to the registry, in HKLM/SYSTEM/CurrentControlSet/Services/… refer to section 3 for details.

3. the execution of

lodctr CRNPerfCounters_Text.ini

which will add the counter text to the registry.

Page 8: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 8

If successful you will get

3) Restart the machine now for the changes to take effect. Note: You may verify the entries in the registry now.

4.2 Modify the Java Environment Depending on the Container/Application Server used to host IBM Cognos ReportNet's Content Manager Servlet changes have to be applied to the environment of that Container/Application Server to supply an additional parameter to the Java Runtime Environment (JRE) which is used.

4.2.1 Apache Tomcat, starting through startup.bat

• Disable the write protection for the startup.bat file in Windows Explorer.

• Open startup.bat in a text editor for editing and add the line highlighted in bold red below at the specified location:

........ rem uncomment next line to run tomcat with debug settings, so can attach a debugger. rem set DEBUG_OPTS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=9091,server=y,suspend=y -Djava.compiler=NONE set JAVA_OPTS=-DCM.Win32Perf rem "for machines with 512MB RAM" set CATALINA_OPTS=-Xmx256m -XX:MaxNewSize=128m -XX:NewSize=64m %DEBUG_OPTS% .....

• Save the file. The next time you start IBM Cognos ReportNet by calling startup.bat the Performance Counters will get populated by CRN.

4.2.2 Apache Tomcat, starting as a Service (through IBM Cognos Configuration)

• Open the file <CRN_ROOT>/bin/bootstrap_win32.xml in a text editor for editing.

IBM Cognos Proprietary Information

Page 9: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 9

IBM Cognos Proprietary Information

• Insert the line highlighted in bold red (~ line 33) in the section where <param> entries get specified.

..... <!-- end debug params --> <param>"-cp"</param> <param>"${baltic_home}/tomcat4.1.27/bin/bootstrap.jar;${baltic_home}/bin/classes12.jar;${baltic_home}/bin/nls_charset12.jar;${baltic_home}/bin/jre/1.3.1/lib/tools.jar"</param> <param>"-Dcatalina.base=${baltic_home}/tomcat4.1.27"</param> <param>"-Dcatalina.home=${baltic_home}/tomcat4.1.27"</param> <param>"-Djava.io.tmpdir=${temp}"</param> <param>"-DCM.Win32Perf"</param> <param>org.apache.catalina.startup.Bootstrap</param> <param>start</param> .....

• Save the file. The next time the Windows Service is started, either through IBM Cognos Configuration or directly in the Services Panel of Windows, the performance counters will get populated.

4.2.3 IBM WebSphere • Open the WebSphere Administration Console • Add the java option at

Servers -> Application Server -> <server name> -> Process Definition -> Java Virtual Machine in the property "Generic JVM arguments". Add –DCM.Win32Perf

• Save to Master configuration and restart the application server instance. 4.2.4 For BEA Weblogic

• Open the startManaged.bat for the instance in which CM resides • Insert the additional JAVA option –DCM.Win32Perf • Save the file and restart the application server instance Please consult your BEA Administrator for details as changes to the startManaged.bat file are sensitive and may impact other server instances.

4.3 Add Counters to the Windows MMC

All that’s left now is to add the new counters to the MMC (Microsoft Management Console) and view them in the Performance monitor. To circumvent an issue about Performance counters not being logged to a file properly due to lack of permissions of the user running the performance monitor the following approach is to be considered the best practice. Even if the counters are not being logged to a file, they can still be viewed in the Performance Monitor.

Page 10: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 10

Note: refer 470783 and 479985 and KB 1036741

1. Open the Performance MMC Snap-in either by (choose one) • right-clicking “My Computer” and select “Manage” to bring up the

Computer Management console. • typing MMC on a shell

Now select File-> Add/Remove snap-in

Next click Add and select “Performance Logs and Alerts” in the “Add Standalone Snap-In dialogue. Click Add there again and see the Performace Logs and Alerts appear in the Add/remove Snap-In dialogue.

Press close and OK.

IBM Cognos Proprietary Information

Page 11: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 11

2. Expand Performance Logs and Alerts and right-click “Counter Logs”. Select “New Log Settings”.

This will create a new set of Performance Counter settings to store the configured counter sets.

3. Choose any applicable name and press OK

4. Click Add Objects to add counters to this new set

IBM Cognos Proprietary Information

Page 12: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 12

5. Select the two sets exposed by ReportNet and use CTRL+click to select them both at a time. Reposition this window as it hides the previous dialogue and it one won’t see the two objects being added once pressing Add. After the two objects have been added click Add and Close.

6. Change settings for log interval and/or log file(s) as required

IBM Cognos Proprietary Information

Page 13: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 13

7. Change Run As to a user which has sufficient registry access by entering a user account name and press Set Password. Enter the password twice and click OK.

8. Press OK to finish the creation of the new counter settings. 9. Now go to Start -> Settings -> Control Panel -> Administrative tools ->

Performance to bring up the Performance Monitor. 10. Click the “New counter Set” button and subsequently right-click into the

counter pane and select “Add Counters”.

IBM Cognos Proprietary Information

Page 14: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 14

11. Change the Performance object drop down to “ReportNet CM Activity” or “ReportNet CM Internals” and select one or all counters to add. Press Add and click close.

IBM Cognos Proprietary Information

Page 15: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 15

12. Start IBM Cognos ReportNet and see the counters being populated

5 Uninstalling Performance Counters

Note: Some brief version of these instructions is to be found in "CRNPerfCounters__Win32_README.rtf" in the <CRN_ROOT>/bin directory.

1) Open a shell in the <CRN_ROOT>/bin directory 2) Execute

regsvr32 /u CRNWin32Perf.DLL

This will remove the dll registration. If successful you will get

IBM Cognos Proprietary Information

Page 16: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 16

3) Restart the machine now for the changes to take effect. Note: You may verify the entries in the registry now.

6 Troubleshooting

• Errors on the event logs every second like The open procedure for service "Cognos ReportNet Performance" in DLL "D:\Program Files\Cognos\crn\bin\CRNWin32Perf.DLL failed. Performance data for this service will not be available. Status code returned is data DWORD 0. This can happen if a new install was done „in-place“ over a previous one without deregistering the dll properly. In that case the previous key registration needs to be manually deleted from the registry. Refer KB1025309 for details.

• In a multi-CM setup only ONE of the CM boxes shows the performance counters. Switching the active CM does not help. This is currently under investigation. Contact Customer Support and refer to issue 521809.

• Performance Counters don’t seem to get populated if Server is accessed through remote desktop. This was observed before but has not been isolated as of now. In any case registering the DLL while being looged on to the server locally solved the issue. Refer 470783

IBM Cognos Proprietary Information

Page 17: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 17

IBM Cognos Proprietary Information

Appendix A – CMActivity Counters

Note: the file cmmsgs_en.xml in the <CRN_ROOT>/configuration folder yields some more description texts, so do CRNPerfCounters_Activity.xml and CMPerfCounters_Internals.xml in the <CRN_ROOT>/bin directory.

RequestsTotal

Label Requests Total Type running total

Explanation The total number of CM requests received since startup.

RequestsCurrent

Label Requests Executing Type actual value

Explanation The current number of CM requests being executed.

RequestsPeak

Label Requests Peak Type peak value

Explanation The maximum number of CM requests concurrently executed since startup.

RequestsTotalDuration

Label RequestsTotalDuration Type -

Explanation Not populated RequestsRate

Label Requests / sec Type Rate, based on RequestsCurrent (in s)

Explanation The rate at which CM is currently handling requests.

RequestsAverageDuration

Page 18: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 18

IBM Cognos Proprietary Information

Label Request execution time (ms) Type Average

Explanation The average number of milliseconds taken to execute recent requests.

SessionsAnonymousCurrent

Label Anonymous Users Type Actual value

Explanation The number of users currently anonymously connected to IBM Cognos

ReportNet

SessionsAnonymousPeak

Label Anonymous Users peakk Type Peak value

Explanation The maximum number of users concurrently anonymously connected since

startup.

SessionsAuthenticatedCurrent

Label Authenticated users Type Actual value

Explanation The number of authenticated users currently connected to IBM Cognos

ReportNet

SessionsAuthenticatedPeak

Label Authenticated users peak Type Peak value

Explanation The maximum number of authenticated users concurrently connected since startup.

SessionsAdminCurrent

Label Administrative Users Type Actual value

Explanation The number of administrative users currently connected to IBM Cognos

Page 19: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 19

IBM Cognos Proprietary Information

ReportNet

SessionsAdminPeak

Label Administrative Users peak Type Peak value

Explanation The maximum number of administrative users concurrently connected since startup.

SessionsCurrent

Label Users Type Actual value

Explanation The number of users currently connected to IBM Cognos ReportNet

SessionsPeak

Label Users peak Type Peak value

Explanation The maximum number of users concurrently connected since startup.

SessionsTotal

Label Sessions Total Type Actual value

Explanation The total number of users who have established a connection since IBM Cognos

ReportNet startup.

DbConnections

Label Database connections Type Actual value

Explanation The number of concurrent content store database connections.

DbConnectionsPeak

Label Database Connections peak Type peak

Page 20: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 20

IBM Cognos Proprietary Information

Explanation The maximum number of concurrent content store database connections since

startup.

Page 21: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 21

IBM Cognos Proprietary Information

Appendix B – CMInternal Counters

This section only lists some most commonly used Counters from this set. See the explanation text as given in the MMC for a brief description of the counters not listed here.

CMThreads

Label Requests Executing Type actual value

Explanation The number of CM requests (threads) currently executing.

CAMAuthDurationTotal

Label Total time authenticating credentials (ms)

Type Sum

Explanation The total milliseconds spent validating request credentials since startup.

DBMSThreadCount

Label Requests in Database Type Actual value

Explanation The number of requests currently performing database operations.

DBMSDurationTotal

Label Total time in database (ms) Type sum

Explanation The total milliseconds spent performing database operations since startup.

DBMSDurationTotal

Label Total time in database (ms) Type sum

Explanation The total milliseconds spent performing database operations since startup.

Page 22: Cognos ReportNet and Windows Performance Counters

ReportNet Windows Performance Counters Revealed 22

IBM Cognos Proprietary Information

JVMMemoryUsedCurr

Label JVM memory used (bytes) Type Actual value

Explanation The amount of memory in use by the JVM JVMMemoryAvailCurr

Label JVM memory available (bytes) Type Actual value

Explanation The amount of system memory reserved by the JVM