IBM Support

Long running SQL in RTM

Question & Answer


Question

You may need to find out all the long running SQL in RTM as they take much resource and lead to RTM slow response.

Answer

In RTM, SQL which runs more than 40 seconds will be treated as long running SQL. You can follow procedure below to find all the long running SQL:

1. In RTM Server Console, run the following command:

mysql cacti -e 'show processlist' > cacti.txt

The command will extract all the running SQL from RTM database.

2. Filter out the long running SQL with following command:

grep cacti cacti.txt | grep -v Sleep | awk '{ if ($6 > 20) print $0}'

[{"Product":{"code":"SSZT2D","label":"IBM Spectrum LSF RTM"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
17 June 2018

UID

isg3T1027391