r4 - 2023-02-16 - 10:12:07 - PaulEllisYou are here: TWiki >  Deployment Web > DeploymentTroubleshooting > PerformanceTroubleshooting > AutomatingQuerystatsCollectionExamples

Automating collection of querystats and counters - examples uc.png

Authors: IanBarnard, WilliamChatham
Build basis: IBM Engineering Requirements Management DOORS Next 7.x.

When collecting must-gather information for DOORS Next, you are asked to collect Foundation Counters as html and to start querystats collection, then reproduce the problem, then collect counters and querystats html pages. This information is an important part of the MustGather, particularly for performance issues.

This page gives you some examples of how the html collection and querystats steps might be automated using a command-line approach which invokes curl to login and then collect the needed information.

The attached scripts are provided as as-is illustrative samples only, i.e. without any support or warranty. You use them at your own risk.

Background

To collect these diagnostics pages from DOORS Next you have to be authenticated as a JazzAdmin user. It's no different if you want to automate the page collection, which will make basically the same HTTP GET operations as using the RM admin UI.

The examples attached to this page are for Windows (cmd) and for Linux (bash). They both start by using curl to login, and these examples use hard-coded credentials. You may be able to implement more secure authentication than the methods in the script using curl.

But if you do use the scripts they authenticate as the specified user and save the authentication cookie to a file cookies.txt which is then used to authenticate the subsequent requests. The cookies are valid for whatever is the authentication expiry timeout of your deployment - this is commonly two or six hours but may have been configured differently in your deployment. The scripts do delete cookies.txt, but again you may want to improve this handling.

NOTE these scripts have only been tried with Form-based authentication; they may not authenticate for deployments using JAS or other forms of authentication.

Pre-requisites

1. To use the scripts attached you must have curl available - the same sequence of operations could be implemented using a different programmatic way of accessing your DOORS Next server, but that is outside the scope of this article.

2. You must enable repodebug - this has to be done manually, and can be done once and left enabled or manually enabled/disabled around the script run. Steps: Browse to https://SERVER:PORT/rm/admin > Advanced Properties, set  "Enable repodebug service" to 'true' and then Save. NOTE that restart is not required when changing this setting.

Collection steps:

Once you have configured the scripts for your environment - in particular the server URL, JazzAdmin user name and password, you can run the script.

The collection scripts have the following steps:

1. Login using hard-coded user/password to create a saved authentication cookie

2. Collect counters html (before) to counters_before.html

3. Stop/reset/start querystats collection

4. Wait for user to press a key - this is when the issue is reproduced, then a key pressed

5. Collect counters html (after) to counters_after.html

6. Collect querystats html to querystats_after.html

7. Delete the saved authentication cookie

Following this you can attach the three html files to the support case.

The example scripts are attached to htis page:

* For Windows (cmd)

* For Linux (bash)

Customizing the scripts

The examples have in the first few lines some variables which must be configured for your environment: they are for the JazzAdmin user name, password and server URL. The examples in the script are illustrative and are not for a publicly accessible server.

Related topics: DOORS Next MustGather, Oracle Must Gather, Db2 Must Gather with repodebug

  • getstats.bat: Example of a Windows cmd batch file to collect counters and querystats

  • getstats.sh: Example of a Linux bash script file to collect counters and querystats
Topic attachments
I Attachment Action Size Date Who Comment
Batbat getstats.bat manage 3.8 K 2023-02-14 - 16:42 IanBarnard Example of a Windows cmd batch file to collect counters and querystats
Shsh getstats.sh manage 2.9 K 2023-02-14 - 16:46 IanBarnard Example of a Linux bash script file to collect counters and querystats
Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions
 
This site is powered by the TWiki collaboration platformCopyright © by IBM and non-IBM contributing authors. All material on this collaboration platform is the property of the contributing authors.
Contributions are governed by our Terms of Use. Please read the following disclaimer.
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.